-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
🐛 Fix kustomize syntax during conversion to patches #3456
Conversation
Hi @mjlshen. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
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.
/lgtm
@lauchokyip: changing LGTM is restricted to collaborators In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
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.
It is great thank you for add this fix.
Would be amazing if we could get it in the e2e tests.
See that we generate a project with webhooks and uncommenting all options here: https://github.com/kubernetes-sigs/kubebuilder/blob/master/test/e2e/v4/generate_test.go we have an e2e test using webhooks.
I think it is missing we add here: https://github.com/kubernetes-sigs/kubebuilder/blob/master/test/e2e/v4/plugin_cluster_test.go#L106-L108 a line to call make manifests and make generate and see if it does not finish with error.
WDYT? If you be enable to add in this PR could you please give a hand for we have the tests in place in a follow up? Or for we have tracked an issue to do so at least?
/Otherwise
All shows fine for me.
/approved
/ok-to-test
required to fix the testdata issue first. If possible would be great we also have the check in the e2e in place to avoid this scenario in the future.
A test for this definitely makes sense, I'll get the test in this PR as well, thanks for the feedback and pointers! |
2ca1179
to
38234b3
Compare
I believe I have now also added a relevant test to guard against bugs like these in the future! |
Nice, I also faced this issue yesterday! @camilamacedo86 : Should we create a ticket to followup this change with the proper updates in the kubebuilder book? What is the adopted practice on the book updates (since it is not versioned along with kubebuilder)? |
The book updates should be in this PR too (the changes underneath |
HI @mjlshen, Could you please rebase this one with the master branch to get the CI fixes? By last would be amazing if we could add the e2e tests in this one |
4aa2294
to
66933fe
Compare
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.
I am unable to reproduce the issue scenario, see: #3425 (comment)
Also, by looking at the kustomize docs the current code implementation shows right: https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/#patch-using-inline-strategic-merge
By last, since I am unable to reproduce, we test this config in the e2e tests where we ensure that all works fine and by looking in the issue seems that the problem is that not all values that should be uncommented were not then, I do not think that we should move with this one.
So, /hold
Let's discuss this scenario in the issue.
Thank you a lot for your collaboration.
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.
Hi mjlshen,
Can we add here the e2e test changes as well so that we can ensure that the same error is no longer faced with the changes performed?
I've moved the e2e test fixes into this PR - thank you a lot for your collaboration as well, working on this PR has been a great experience! |
This commit fixes the syntax error introduced in kubernetes-sigs#3374 where pathcesStrategicMerge was replaced with patches, which now requires that every patch additionally have a "path" key when multiple patches are specified in a file. Signed-off-by: Michael Shen <[email protected]>
/test pull-kubebuilder-e2e-k8s-1-26-0 |
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.
/hold cancel
It has a test either to show that it fixes the issue
/approved
/lgtm
Thank you a lot for your contribution 🥇
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: camilamacedo86, lauchokyip, mjlshen 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 |
This commit fixes the syntax error introduced in #3374 where pathcesStrategicMerge was replaced with patches, which now requires that every patch additionally have a "path" key when multiple patches are specified in a file.
Fixes #3425