Skip to content

Commit 2298b0c

Browse files
authored
Remove invalid kustomizeconfig from config/webhook (#2541)
This change has no effect on the output of this kustomization because the removed configuration was redundant. However, it fixes a bug which can be triggered when using this kustomization as a base for another kustomization. kustomizeconfig contained 3 directives: * nameReference * namespace * varReference varReference is redundant because vars are no longer used in this kustomize: they are deprecated and usage was removed some time ago. nameReference is redundant because the specified configuration is already in kustomize's defaults. However, nameReference is the important transformation here. namespace is incorrect. It directs the namespace transformer to update webhooks/clientConfig/service/namespace. However, this is not the intended function of the namespace transformer: it should only set the namespace directly on objects and allow references to be updated automatically by nameReference. Configuring it to update a reference directly leaves kustomize with inconsistent internal state. Depending on execution order this can cause a subsequent transformation to fail to update the reference when it makes further changes to the Service
1 parent a4c2ae1 commit 2298b0c

File tree

2 files changed

+0
-28
lines changed

2 files changed

+0
-28
lines changed

config/webhook/kustomization.yaml

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

config/webhook/kustomizeconfig.yaml

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

0 commit comments

Comments
 (0)