-
Notifications
You must be signed in to change notification settings - Fork 428
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
Use // +kubebuilder:default
annotations where possible
#4204
Comments
@nojnhuh: GuidelinesPlease ensure that the issue body includes answers to the following questions:
For more details on the requirements of such an issue, please see here and ensure that they are met. If this request no longer meets these requirements, the label can be removed 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. |
I'd like to work on this, assigning it to myself. /assign |
@SubhasmitaSw Feel free to re-assign yourself to this issue and reopen #4214 if you plan to get back to this. /unassign @SubhasmitaSw |
I would like to go with this issue! |
Thank you! |
It doesn't look like there has been any new progress on this issue. I can work on this issue if no one is actively working on it. |
Feel free to pick it up @bryan-cox ! |
/assign |
/kind cleanup
/good-first-issue
/help
What needs cleanup:
There are several places in the defaulting webhooks where CAPZ defaults a static value that could be replaced with the
// +kubebuilder:default
annotation on the API type.e.g. this code defaults a static value
cluster-api-provider-azure/api/v1beta1/azuremanagedcontrolplane_webhook.go
Lines 75 to 78 in e2bd592
It should be removed and replaced by the following change to this block:
cluster-api-provider-azure/api/v1beta1/azuremanagedcontrolplane_types.go
Lines 118 to 123 in e2bd592
Tests that verify the removed code should also be removed.
After modifying the annotations, run
make generate-manifests
to encode the new defaults in the CRDs.Describe the solution you'd like
Walk through the webhooks starting at the following places and replace hand-rolled code to default fields with static fields with the kubebuilder annotation:
cluster-api-provider-azure/api/v1beta1/azuremachine_webhook.go
Line 221 in e2bd592
cluster-api-provider-azure/api/v1beta1/azuremachinetemplate_webhook.go
Line 145 in e2bd592
cluster-api-provider-azure/api/v1beta1/azuremanagedcontrolplane_webhook.go
Line 70 in e2bd592
cluster-api-provider-azure/api/v1beta1/azuremanagedmachinepool_webhook.go
Line 68 in e2bd592
cluster-api-provider-azure/exp/api/v1beta1/azuremachinepool_webhook.go
Line 59 in e2bd592
Anything else you would like to add:
[Miscellaneous information that will assist in solving the issue.]
The text was updated successfully, but these errors were encountered: