@@ -96,16 +96,20 @@ func (co *consoleOperator) sync_v400(ctx context.Context, controllerContext fact
96
96
}
97
97
98
98
var (
99
- authServerCAConfig * corev1.ConfigMap
100
- sessionSecret * corev1.Secret
99
+ targetNamespaceAuthServerCA * corev1.ConfigMap
100
+ sessionSecret * corev1.Secret
101
101
)
102
102
switch authnConfig .Spec .Type {
103
103
case configv1 .AuthenticationTypeOIDC :
104
104
if len (authnConfig .Spec .OIDCProviders ) > 0 {
105
105
oidcProvider := authnConfig .Spec .OIDCProviders [0 ]
106
- authServerCAConfig , err = co .configNSConfigMapLister .ConfigMaps (api .OpenShiftConsoleNamespace ).Get (oidcProvider .Issuer .CertificateAuthority .Name )
107
- if err != nil && ! apierrors .IsNotFound (err ) {
108
- return statusHandler .FlushAndReturn (err )
106
+ certAuthorityName := oidcProvider .Issuer .CertificateAuthority .Name
107
+ if certAuthorityName != "" {
108
+ targetNamespaceAuthServerCA , err = co .targetNSConfigMapLister .ConfigMaps (api .OpenShiftConsoleNamespace ).Get (certAuthorityName )
109
+ statusHandler .AddConditions (status .HandleProgressingOrDegraded ("OIDCProviderTrustedAuthorityConfigGet" , "FailedGet" , err ))
110
+ if err != nil {
111
+ return statusHandler .FlushAndReturn (err )
112
+ }
109
113
}
110
114
}
111
115
@@ -127,7 +131,6 @@ func (co *consoleOperator) sync_v400(ctx context.Context, controllerContext fact
127
131
set .Console ,
128
132
set .Infrastructure ,
129
133
set .OAuth ,
130
- authServerCAConfig ,
131
134
authnConfig ,
132
135
consoleRoute ,
133
136
controllerContext .Recorder (),
@@ -179,7 +182,7 @@ func (co *consoleOperator) sync_v400(ctx context.Context, controllerContext fact
179
182
cm ,
180
183
serviceCAConfigMap ,
181
184
oauthServingCertConfigMap ,
182
- authServerCAConfig ,
185
+ targetNamespaceAuthServerCA ,
183
186
trustedCAConfigMap ,
184
187
clientSecret ,
185
188
sessionSecret ,
@@ -333,7 +336,6 @@ func (co *consoleOperator) SyncConfigMap(
333
336
consoleConfig * configv1.Console ,
334
337
infrastructureConfig * configv1.Infrastructure ,
335
338
oauthConfig * configv1.OAuth ,
336
- authServerCAConfig * corev1.ConfigMap ,
337
339
authConfig * configv1.Authentication ,
338
340
activeConsoleRoute * routev1.Route ,
339
341
recorder events.Recorder ,
@@ -400,7 +402,6 @@ func (co *consoleOperator) SyncConfigMap(
400
402
operatorConfig ,
401
403
consoleConfig ,
402
404
authConfig ,
403
- authServerCAConfig ,
404
405
managedConfig ,
405
406
monitoringSharedConfig ,
406
407
infrastructureConfig ,
0 commit comments