Skip to content

Commit e098a42

Browse files
committed
chore(webhooks): register identity API types in controller-manager Scheme
Add identityv1alpha1 to the controller-manager Scheme to enable UserIdentity webhook registration. Without this registration, the webhook server fails to start with 'no kind is registered' error. Changes: - Add identityv1alpha1 import to controller-manager - Register identityv1alpha1.AddToScheme in init() - Use proper Kubernetes error wrappers (NewForbidden, NewBadRequest, NewInternalError) - Restrict User email updates to self-service only This fixes the test failures where webhooks were returning 'connection refused' because the controller-manager was crashing during webhook setup.
1 parent 11292a0 commit e098a42

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

cmd/milo/controller-manager/controllermanager.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ import (
9191
resourcemanagerv1alpha1webhook "go.miloapis.com/milo/internal/webhooks/resourcemanager/v1alpha1"
9292
crmv1alpha1 "go.miloapis.com/milo/pkg/apis/crm/v1alpha1"
9393
iamv1alpha1 "go.miloapis.com/milo/pkg/apis/iam/v1alpha1"
94+
identityv1alpha1 "go.miloapis.com/milo/pkg/apis/identity/v1alpha1"
9495
infrastructurev1alpha1 "go.miloapis.com/milo/pkg/apis/infrastructure/v1alpha1"
9596
notificationv1alpha1 "go.miloapis.com/milo/pkg/apis/notification/v1alpha1"
9697
quotav1alpha1 "go.miloapis.com/milo/pkg/apis/quota/v1alpha1"
@@ -170,6 +171,7 @@ func init() {
170171
utilruntime.Must(resourcemanagerv1alpha1.AddToScheme(Scheme))
171172
utilruntime.Must(infrastructurev1alpha1.AddToScheme(Scheme))
172173
utilruntime.Must(iamv1alpha1.AddToScheme(Scheme))
174+
utilruntime.Must(identityv1alpha1.AddToScheme(Scheme))
173175
utilruntime.Must(notificationv1alpha1.AddToScheme(Scheme))
174176
utilruntime.Must(crmv1alpha1.AddToScheme(Scheme))
175177
utilruntime.Must(quotav1alpha1.AddToScheme(Scheme))

0 commit comments

Comments
 (0)