Skip to content

Commit ca5552f

Browse files
committed
fix webhook getting registered for GlobalInClusterIPPool
1 parent 6a46e9e commit ca5552f

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

internal/webhooks/infobloxippool.go

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ import (
2929
"k8s.io/apimachinery/pkg/runtime"
3030
"k8s.io/apimachinery/pkg/util/validation/field"
3131
"k8s.io/utils/ptr"
32-
"sigs.k8s.io/cluster-api-ipam-provider-in-cluster/api/v1alpha2"
3332
ctrl "sigs.k8s.io/controller-runtime"
3433
"sigs.k8s.io/controller-runtime/pkg/client"
3534
"sigs.k8s.io/controller-runtime/pkg/webhook"
@@ -44,16 +43,8 @@ const (
4443
)
4544

4645
func (webhook *InfobloxIPPool) SetupWebhookWithManager(mgr ctrl.Manager) error {
47-
err := ctrl.NewWebhookManagedBy(mgr).
48-
For(&v1alpha1.InfobloxIPPool{}).
49-
WithDefaulter(webhook).
50-
WithValidator(webhook).
51-
Complete()
52-
if err != nil {
53-
return err
54-
}
5546
return ctrl.NewWebhookManagedBy(mgr).
56-
For(&v1alpha2.GlobalInClusterIPPool{}).
47+
For(&v1alpha1.InfobloxIPPool{}).
5748
WithDefaulter(webhook).
5849
WithValidator(webhook).
5950
Complete()

0 commit comments

Comments
 (0)