kubernetes-sigs / cluster-api-provider-azure

Cluster API implementation for Microsoft Azure
https://capz.sigs.k8s.io/
Apache License 2.0
295 stars 425 forks source link

Consolidate duplicate webhook logic for managed cluster types #4530

Open nojnhuh opened 9 months ago

nojnhuh commented 9 months ago

/kind cleanup

What needs cleanup: [A clear and concise description of what needs to be cleaned up.]

Currently, the same logic is duplicated in both the template and non-template webhooks for AzureManaged* resources:

https://github.com/kubernetes-sigs/cluster-api-provider-azure/blob/2522297040bad726d43547531da05d012368f053/api/v1beta1/azuremanagedcontrolplanetemplate_default.go#L26 https://github.com/kubernetes-sigs/cluster-api-provider-azure/blob/2522297040bad726d43547531da05d012368f053/api/v1beta1/azuremanagedcontrolplane_webhook.go#L79

Describe the solution you'd like

The webhooks for AzureManaged* resources should follow the same pattern as the self-managed cluster types to avoid duplication.

Anything else you would like to add: [Miscellaneous information that will assist in solving the issue.]

nojnhuh commented 9 months ago

/milestone v1.14

mboersma commented 6 months ago

/milestone next

k8s-triage-robot commented 2 months ago

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

nawazkh commented 2 months ago

/remove-lifecycle stale