Skip to content

Commit 373647f

Browse files
committed
fix webhooks
1 parent 5e5d3a1 commit 373647f

File tree

6 files changed

+8
-8
lines changed

6 files changed

+8
-8
lines changed

api/v1beta1/azurecluster_webhook.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ import (
3333
func (c *AzureCluster) SetupWebhookWithManager(mgr ctrl.Manager) error {
3434
return ctrl.NewWebhookManagedBy(mgr).
3535
For(c).
36-
WithDefaulter(&AzureCluster{}).
37-
WithValidator(&AzureCluster{}).
36+
WithDefaulter(c).
37+
WithValidator(c).
3838
Complete()
3939
}
4040

api/v1beta1/azureclusteridentity_webhook.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ import (
3232
func (c *AzureClusterIdentity) SetupWebhookWithManager(mgr ctrl.Manager) error {
3333
return ctrl.NewWebhookManagedBy(mgr).
3434
For(c).
35-
WithValidator(&AzureClusterIdentity{}).
35+
WithValidator(c).
3636
Complete()
3737
}
3838

api/v1beta1/azureclustertemplate_webhook.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ const AzureClusterTemplateImmutableMsg = "AzureClusterTemplate spec.template.spe
3434
func (c *AzureClusterTemplate) SetupWebhookWithManager(mgr ctrl.Manager) error {
3535
return ctrl.NewWebhookManagedBy(mgr).
3636
For(c).
37-
WithDefaulter(&AzureClusterTemplate{}).
38-
WithValidator(&AzureClusterTemplate{}).
37+
WithDefaulter(c).
38+
WithValidator(c).
3939
Complete()
4040
}
4141

api/v1beta1/azuremanagedcluster_webhook.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import (
2828
func (r *AzureManagedCluster) SetupWebhookWithManager(mgr ctrl.Manager) error {
2929
return ctrl.NewWebhookManagedBy(mgr).
3030
For(r).
31-
WithValidator(&AzureManagedCluster{}).
31+
WithValidator(r).
3232
Complete()
3333
}
3434

api/v1beta1/azuremanagedclustertemplate_webhook.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import (
2828
func (r *AzureManagedClusterTemplate) SetupWebhookWithManager(mgr ctrl.Manager) error {
2929
return ctrl.NewWebhookManagedBy(mgr).
3030
For(r).
31-
WithValidator(&AzureManagedClusterTemplate{}).
31+
WithValidator(r).
3232
Complete()
3333
}
3434

exp/api/v1beta1/azuremachinepoolmachine_webhook.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import (
2929
func (ampm *AzureMachinePoolMachine) SetupWebhookWithManager(mgr ctrl.Manager) error {
3030
return ctrl.NewWebhookManagedBy(mgr).
3131
For(ampm).
32-
WithValidator(&AzureMachinePoolMachine{}).
32+
WithValidator(ampm).
3333
Complete()
3434
}
3535

0 commit comments

Comments
 (0)