Skip to content

Commit 3637454

Browse files
committed
oidcsetup: move 'OIDCClientConfig' handling to top-level sync
1 parent f92f251 commit 3637454

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

pkg/console/controllers/oidcsetup/oidcsetup.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,12 @@ func (c *oidcSetupController) sync(ctx context.Context, syncCtx factory.SyncCont
107107

108108
if authnConfig.Spec.Type == configv1.AuthenticationTypeOIDC {
109109
err = c.syncAuthTypeOIDC(ctx, syncCtx, statusHandler, operatorConfig, authnConfig)
110+
statusHandler.AddConditions(status.HandleProgressingOrDegraded("OIDCClientConfig", "MissingID", err))
110111
if err != nil {
111112
return statusHandler.FlushAndReturn(err)
112113
}
114+
} else {
115+
statusHandler.AddConditions(status.HandleProgressingOrDegraded("OIDCClientConfig", "", nil))
113116
}
114117

115118
oidcClientsSchema, err := authnConfigHasOIDCFields(c.crdLister)
@@ -144,9 +147,7 @@ func (c *oidcSetupController) syncAuthTypeOIDC(
144147
}
145148

146149
if len(clientConfig.ClientID) == 0 {
147-
err := fmt.Errorf("no ID set on OIDC client")
148-
statusHandler.AddConditions(status.HandleProgressingOrDegraded("OIDCClientConfig", "MissingID", err))
149-
return statusHandler.FlushAndReturn(err)
150+
return fmt.Errorf("no ID set on console's OIDC client")
150151
}
151152
c.authStatusHandler.WithCurrentOIDCClient(clientConfig.ClientID)
152153

0 commit comments

Comments
 (0)