Skip to content

Evaluate unused Webhooks #5615

Open
Open
@nawazkh

Description

@nawazkh

/kind cleanup

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

Describe the solution you'd like
[Description of how you would like the cleanup to be done.]

  • Evaluate if we should disable the webhooks for below Resources. Their webhooks are a no-hop at the moment.
  • We can disable them by removing the kubebuilder annotation so that the final render of CAPZ manifests does not include the two webhooks.
  • We need to discuss if removing those manifestations is a good step ahead or not.
    • The change-set is quite simple, just drop the two annotations listed below, but we need to have a broader discussion on removing the nil webhooks is the right approach here .

Files to change: 2

  • /api/v1beta1/azuremanagedcluster_webhook.go

    // +kubebuilder:webhook:verbs=create;update,path=/validate-infrastructure-cluster-x-k8s-io-v1beta1-azuremanagedcluster,mutating=false,failurePolicy=fail,groups=infrastructure.cluster.x-k8s.io,resources=azuremanagedclusters,versions=v1beta1,name=validation.azuremanagedclusters.infrastructure.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1
    
  • /api/v1beta1/azuremanagedclustertemplate_webhook.go

    // +kubebuilder:webhook:verbs=update,path=/validate-infrastructure-cluster-x-k8s-io-v1beta1-azuremanagedclustertemplate,mutating=false,failurePolicy=fail,groups=infrastructure.cluster.x-k8s.io,resources=azuremanagedclustertemplates,versions=v1beta1,name=validation.azuremanagedclustertemplates.infrastructure.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1
    

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/cleanupCategorizes issue or PR as related to cleaning up code, process, or technical debt.priority/important-longtermImportant over the long term, but may not be staffed and/or may need multiple releases to complete.

    Type

    Projects

    Status

    Todo

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions