@@ -95,16 +95,20 @@ func (co *consoleOperator) sync_v400(ctx context.Context, controllerContext fact
95
95
}
96
96
97
97
var (
98
- authServerCAConfig * corev1.ConfigMap
99
- sessionSecret * corev1.Secret
98
+ targetNamespaceAuthServerCA * corev1.ConfigMap
99
+ sessionSecret * corev1.Secret
100
100
)
101
101
switch authnConfig .Spec .Type {
102
102
case configv1 .AuthenticationTypeOIDC :
103
103
if len (authnConfig .Spec .OIDCProviders ) > 0 {
104
104
oidcProvider := authnConfig .Spec .OIDCProviders [0 ]
105
- authServerCAConfig , err = co .configNSConfigMapLister .ConfigMaps (api .OpenShiftConsoleNamespace ).Get (oidcProvider .Issuer .CertificateAuthority .Name )
106
- if err != nil && ! apierrors .IsNotFound (err ) {
107
- return statusHandler .FlushAndReturn (err )
105
+ certAuthorityName := oidcProvider .Issuer .CertificateAuthority .Name
106
+ if certAuthorityName != "" {
107
+ targetNamespaceAuthServerCA , err = co .targetNSConfigMapLister .ConfigMaps (api .OpenShiftConsoleNamespace ).Get (certAuthorityName )
108
+ statusHandler .AddConditions (status .HandleProgressingOrDegraded ("OIDCProviderTrustedAuthorityConfigGet" , "FailedGet" , err ))
109
+ if err != nil {
110
+ return statusHandler .FlushAndReturn (err )
111
+ }
108
112
}
109
113
}
110
114
@@ -120,7 +124,6 @@ func (co *consoleOperator) sync_v400(ctx context.Context, controllerContext fact
120
124
set .Console ,
121
125
set .Infrastructure ,
122
126
set .OAuth ,
123
- authServerCAConfig ,
124
127
authnConfig ,
125
128
consoleRoute ,
126
129
controllerContext .Recorder (),
@@ -181,7 +184,7 @@ func (co *consoleOperator) sync_v400(ctx context.Context, controllerContext fact
181
184
cm ,
182
185
serviceCAConfigMap ,
183
186
oauthServingCertConfigMap ,
184
- authServerCAConfig ,
187
+ targetNamespaceAuthServerCA ,
185
188
trustedCAConfigMap ,
186
189
clientSecret ,
187
190
sessionSecret ,
@@ -338,7 +341,6 @@ func (co *consoleOperator) SyncConfigMap(
338
341
consoleConfig * configv1.Console ,
339
342
infrastructureConfig * configv1.Infrastructure ,
340
343
oauthConfig * configv1.OAuth ,
341
- authServerCAConfig * corev1.ConfigMap ,
342
344
authConfig * configv1.Authentication ,
343
345
activeConsoleRoute * routev1.Route ,
344
346
recorder events.Recorder ,
@@ -405,7 +407,6 @@ func (co *consoleOperator) SyncConfigMap(
405
407
operatorConfig ,
406
408
consoleConfig ,
407
409
authConfig ,
408
- authServerCAConfig ,
409
410
managedConfig ,
410
411
monitoringSharedConfig ,
411
412
infrastructureConfig ,
0 commit comments