api/konfig/builtinpluginconsts/namespace: Add CustomResourceDefinition webhook namespace transformer

This commit is contained in:
RyanSquared
2021-03-16 19:35:18 -05:00
parent 1301384670
commit 3ff5263ff6
2 changed files with 29 additions and 0 deletions

View File

@@ -19,5 +19,8 @@ namespace:
group: apiregistration.k8s.io
kind: APIService
create: true
- path: spec/conversion/webhook/clientConfig/service/namespace
group: apiextensions.k8s.io
kind: CustomResourceDefinition
`
)

View File

@@ -306,6 +306,19 @@ kind: CustomResourceDefinition
metadata:
name: crds.my.org
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: namespace.crds.my.org
spec:
conversion:
strategy: Webhook
webhook:
clientConfig:
service:
name: crd-svc
namespace: random
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
@@ -407,6 +420,19 @@ kind: CustomResourceDefinition
metadata:
name: crds.my.org
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: namespace.crds.my.org
spec:
conversion:
strategy: Webhook
webhook:
clientConfig:
service:
name: crd-svc
namespace: newnamespace
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata: