-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
🐛 check if resource exist to allow to create webhooks #1708
🐛 check if resource exist to allow to create webhooks #1708
Conversation
997cf54
to
48efa18
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.
/approve
Thank you for this!! I had one tiny nit but it's non-blocking :)
pkg/plugin/v2/webhook.go
Outdated
// check if resource exist to create webhook | ||
if !p.config.HasResource(p.resource.GVK()) { | ||
return fmt.Errorf("%s create webhook requires an api with the group,"+ | ||
" kind and version informed", p.commandName) |
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.
would provided
be a better term here?
" kind and version informed", p.commandName) | |
" kind and version provided", p.commandName) |
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.
done :-)
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: camilamacedo86, gabbifish 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 |
48efa18
to
77e00f8
Compare
/lgtm |
/test pull-kubebuilder-e2e-k8s-1-14-1 |
Description
Add check to ensure that the resource exists to allow create webhooks and avoid issues such as :
Motivation
Closes: #1701