-
Notifications
You must be signed in to change notification settings - Fork 306
🌱 Able to export webhooks for external utilization #3434
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
🌱 Able to export webhooks for external utilization #3434
Conversation
chrischdi
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.
/lgtm
/approve
|
LGTM label has been added. Git tree hash: c962eed95b46dba93fadd1b92e35c54412996239
|
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: chrischdi 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 |
|
/cherry-pick release-1.11 |
|
@dmvolod: new pull request created: #3454 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-sigs/prow repository. |
|
/cherry-pick release-1.12 |
|
@dmvolod: new pull request created: #3455 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-sigs/prow repository. |
|
/cherry-pick release-1.13 |
|
@dmvolod: new pull request created: #3456 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-sigs/prow repository. |
|
/assign |
sbueringer
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.
@dmvolod please follow-up on the findings. I'll then merge through all PRs
| ) | ||
|
|
||
| // VSphereClusterTemplateWebhook implements a validation and defaulting webhook for VSphereClusterTemplate. | ||
| type VSphereClusterTemplateWebhook struct{} |
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.
Should not have a "Webhook" suffix because the package already contains webhooks. (also for all other webhooks)
| "sigs.k8s.io/cluster-api-provider-vsphere/internal/webhooks" | ||
| ) | ||
|
|
||
| // VSphereClusterTemplateWebhook implements a validation and defaulting webhook for VSphereClusterTemplate. |
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.
This is not correct as it doesn't implement a defaulting webhook. Let's drop this detail here to avoid having to keep that in sync
// VSphereClusterTemplateWebhook implements a webhook for VSphereClusterTemplate.(also for all other webhooks)
Yes, sure, @sbueringer |
Thx
Yeah, no worries. I'll take care of all of that |
What this PR does / why we need it:
This fix allows to export web-hook code for use in external projects as well as controllers code.
This is the same approach as Cluster API web-hooks exporting, when you need to compile code that will include all controllers and their logic, such as web-hooks, in a single binary file.
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 #