Skip to content

Commit b5a66b0

Browse files
authored
🐛 Removed config/webhook/kustomizeconfig.yaml and config/crd/kustomizeconfig.yaml - these are redundant since Kustomize v3.5.4+ has built-in support. This also fixes namespace transformation bugs when using projects as Kustomize bases/overlays. (#5245)
* Remove redundant and incorrect kustomizeconfig from webhooks * Remove incorrect kustomizeconfig from crds
1 parent c169977 commit b5a66b0

File tree

20 files changed

+0
-247
lines changed

20 files changed

+0
-247
lines changed

docs/book/src/cronjob-tutorial/testdata/project/config/crd/kustomizeconfig.yaml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,5 @@ nameReference:
88
group: apiextensions.k8s.io
99
path: spec/conversion/webhook/clientConfig/service/name
1010

11-
namespace:
12-
- kind: CustomResourceDefinition
13-
version: v1
14-
group: apiextensions.k8s.io
15-
path: spec/conversion/webhook/clientConfig/service/namespace
16-
create: false
17-
1811
varReference:
1912
- path: metadata/annotations
Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
11
resources:
22
- manifests.yaml
33
- service.yaml
4-
5-
configurations:
6-
- kustomizeconfig.yaml

docs/book/src/cronjob-tutorial/testdata/project/config/webhook/kustomizeconfig.yaml

Lines changed: 0 additions & 22 deletions
This file was deleted.

docs/book/src/getting-started/testdata/project/config/crd/kustomizeconfig.yaml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,5 @@ nameReference:
88
group: apiextensions.k8s.io
99
path: spec/conversion/webhook/clientConfig/service/name
1010

11-
namespace:
12-
- kind: CustomResourceDefinition
13-
version: v1
14-
group: apiextensions.k8s.io
15-
path: spec/conversion/webhook/clientConfig/service/namespace
16-
create: false
17-
1811
varReference:
1912
- path: metadata/annotations

docs/book/src/multiversion-tutorial/testdata/project/config/crd/kustomizeconfig.yaml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,5 @@ nameReference:
88
group: apiextensions.k8s.io
99
path: spec/conversion/webhook/clientConfig/service/name
1010

11-
namespace:
12-
- kind: CustomResourceDefinition
13-
version: v1
14-
group: apiextensions.k8s.io
15-
path: spec/conversion/webhook/clientConfig/service/namespace
16-
create: false
17-
1811
varReference:
1912
- path: metadata/annotations
Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
11
resources:
22
- manifests.yaml
33
- service.yaml
4-
5-
configurations:
6-
- kustomizeconfig.yaml

docs/book/src/multiversion-tutorial/testdata/project/config/webhook/kustomizeconfig.yaml

Lines changed: 0 additions & 22 deletions
This file was deleted.

pkg/plugins/common/kustomize/v2/scaffolds/internal/templates/config/crd/kustomizeconfig.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,6 @@ nameReference:
5252
group: apiextensions.k8s.io
5353
path: spec/conversion/webhook/clientConfig/service/name
5454
55-
namespace:
56-
- kind: CustomResourceDefinition
57-
version: v1
58-
group: apiextensions.k8s.io
59-
path: spec/conversion/webhook/clientConfig/service/namespace
60-
create: false
61-
6255
varReference:
6356
- path: metadata/annotations
6457
`

pkg/plugins/common/kustomize/v2/scaffolds/internal/templates/config/webhook/kustomization.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,4 @@ func (f *Kustomization) SetTemplateDefaults() error {
5353
const kustomizeWebhookTemplate = `resources:
5454
- manifests{{ if ne .Resource.Webhooks.WebhookVersion "v1" }}.{{ .Resource.Webhooks.WebhookVersion }}{{ end }}.yaml
5555
- service.yaml
56-
57-
configurations:
58-
- kustomizeconfig.yaml
5956
`

pkg/plugins/common/kustomize/v2/scaffolds/internal/templates/config/webhook/kustomizeconfig.go

Lines changed: 0 additions & 69 deletions
This file was deleted.

0 commit comments

Comments
 (0)