@@ -35,13 +35,13 @@ import (
3535// +kubebuilder:webhook:verbs=create;update,path=/validate-infrastructure-cluster-x-k8s-io-v1beta1-vspherefailuredomain,mutating=false,failurePolicy=fail,matchPolicy=Equivalent,groups=infrastructure.cluster.x-k8s.io,resources=vspherefailuredomains,versions=v1beta1,name=validation.vspherefailuredomain.infrastructure.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1beta1
3636// +kubebuilder:webhook:path=/mutate-infrastructure-cluster-x-k8s-io-v1beta1-vspherefailuredomain,mutating=true,failurePolicy=fail,matchPolicy=Equivalent,groups=infrastructure.cluster.x-k8s.io,resources=vspherefailuredomains,verbs=create;update,versions=v1beta1,name=default.vspherefailuredomain.infrastructure.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1beta1
3737
38- // VSphereFailureDomainWebhook implements a validation and defaulting webhook for VSphereFailureDomain.
39- type VSphereFailureDomainWebhook struct {}
38+ // VSphereFailureDomain implements a validation and defaulting webhook for VSphereFailureDomain.
39+ type VSphereFailureDomain struct {}
4040
41- var _ webhook.CustomValidator = & VSphereFailureDomainWebhook {}
42- var _ webhook.CustomDefaulter = & VSphereFailureDomainWebhook {}
41+ var _ webhook.CustomValidator = & VSphereFailureDomain {}
42+ var _ webhook.CustomDefaulter = & VSphereFailureDomain {}
4343
44- func (webhook * VSphereFailureDomainWebhook ) SetupWebhookWithManager (mgr ctrl.Manager ) error {
44+ func (webhook * VSphereFailureDomain ) SetupWebhookWithManager (mgr ctrl.Manager ) error {
4545 return ctrl .NewWebhookManagedBy (mgr ).
4646 For (& infrav1.VSphereFailureDomain {}).
4747 WithValidator (webhook ).
@@ -50,7 +50,7 @@ func (webhook *VSphereFailureDomainWebhook) SetupWebhookWithManager(mgr ctrl.Man
5050}
5151
5252// ValidateCreate implements webhook.Validator so a webhook will be registered for the type.
53- func (webhook * VSphereFailureDomainWebhook ) ValidateCreate (_ context.Context , raw runtime.Object ) (admission.Warnings , error ) {
53+ func (webhook * VSphereFailureDomain ) ValidateCreate (_ context.Context , raw runtime.Object ) (admission.Warnings , error ) {
5454 var allErrs field.ErrorList
5555
5656 obj , ok := raw .(* infrav1.VSphereFailureDomain )
@@ -91,7 +91,7 @@ func (webhook *VSphereFailureDomainWebhook) ValidateCreate(_ context.Context, ra
9191}
9292
9393// ValidateUpdate implements webhook.Validator so a webhook will be registered for the type.
94- func (webhook * VSphereFailureDomainWebhook ) ValidateUpdate (_ context.Context , oldRaw runtime.Object , newRaw runtime.Object ) (admission.Warnings , error ) {
94+ func (webhook * VSphereFailureDomain ) ValidateUpdate (_ context.Context , oldRaw runtime.Object , newRaw runtime.Object ) (admission.Warnings , error ) {
9595 oldTyped , ok := oldRaw .(* infrav1.VSphereFailureDomain )
9696 if ! ok {
9797 return nil , apierrors .NewBadRequest (fmt .Sprintf ("expected a VSphereFailureDomain but got a %T" , oldRaw ))
@@ -107,12 +107,12 @@ func (webhook *VSphereFailureDomainWebhook) ValidateUpdate(_ context.Context, ol
107107}
108108
109109// ValidateDelete implements webhook.Validator so a webhook will be registered for the type.
110- func (webhook * VSphereFailureDomainWebhook ) ValidateDelete (_ context.Context , _ runtime.Object ) (admission.Warnings , error ) {
110+ func (webhook * VSphereFailureDomain ) ValidateDelete (_ context.Context , _ runtime.Object ) (admission.Warnings , error ) {
111111 return nil , nil
112112}
113113
114114// Default implements webhook.Defaulter so a webhook will be registered for the type.
115- func (webhook * VSphereFailureDomainWebhook ) Default (_ context.Context , obj runtime.Object ) error {
115+ func (webhook * VSphereFailureDomain ) Default (_ context.Context , obj runtime.Object ) error {
116116 typedObj , ok := obj .(* infrav1.VSphereFailureDomain )
117117 if ! ok {
118118 return apierrors .NewBadRequest (fmt .Sprintf ("expected a VSphereFailureDomain but got a %T" , obj ))
0 commit comments