-
Notifications
You must be signed in to change notification settings - Fork 222
Remove invalid kustomizeconfig from config/webhook #1565
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove invalid kustomizeconfig from config/webhook #1565
Conversation
✅ Deploy Preview for kubernetes-sigs-cluster-api-gcp ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
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 object.
acd51d4 to
7571c03
Compare
damdo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/approve
|
/assign @salasberryfin For the LGTM |
salasberryfin
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @mdbooth.
/lgtm
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: damdo, mdbooth, salasberryfin The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind bug
What this PR does / why we need it:
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:
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
object.
This issue is common amongst multiple providers, likely because it was present in an early version of the kubebuilder templates.
This PR is based on kubernetes-sigs/cluster-api-provider-azure#5982
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)format, will close the issue(s) when PR gets merged):Fixes #
Special notes for your reviewer:
To confirm that the removed configuration was redundant:
make release-manifestsout/infrastructure-components.yamlto /tmpmake release-manifestsagainRelease note: