-
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
🐛 (go/v4): Fix path configuration for webhook markers generated for core types with non-"core" group values #4301
🐛 (go/v4): Fix path configuration for webhook markers generated for core types with non-"core" group values #4301
Conversation
Hi @damsien. 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-sigs/prow 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.
Hi @damsien
Thank you for push the fix.
That is great 🥇
Can you please run make generate
?
We need to run this command for all prs, so that it will update the samples under testdata and under the docs with your changes.
Also, please ensure that those changes are committed and squashed.
We need to have one commit per PR.
I already ran I try again to make it works well |
/ok-to-test |
Hi @damsien See that we have the script to generate all that is under testdata: https://github.com/kubernetes-sigs/kubebuilder/blob/master/test/testdata/generate.sh Then, see that we test things out by scaffolding an webhook for Core Type here:
However, both are using Group "core" and Kind Pod Please, add the command to generate:
|
408a37f
to
6fa2024
Compare
Done ✔️ |
6fa2024
to
11d6e09
Compare
pkg/plugins/golang/v4/scaffolds/internal/templates/webhooks/webhook.go
Outdated
Show resolved
Hide resolved
pkg/plugins/golang/v4/scaffolds/internal/templates/webhooks/webhook.go
Outdated
Show resolved
Hide resolved
11d6e09
to
6a46e63
Compare
/approved Thank you a lot for your contribution 🥇 |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: camilamacedo86, damsien 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 PR is related to this issue: #4300. I added one more check on resources that belongs to a group even if they are considered to be part of the core type.
So
kubebuilder create webhook --group apps --version v1 --kind Deployment --programmatic-validation
will generate:And
kubebuilder create webhook --group core --version v1 --kind Pod --programmatic-validation
will generate:as expected.
We already discussed about the double dash
--
for the core group in the linked issue.