Skip to content

Commit 8145d8c

Browse files
committed
Move metadata CM publish behind route
As we don't yet have a cluster operator deployed by the CVO, we need to make sure that the OAuth metadata is published as soon as we can so that it is reflected in the API server for the other components. Once we get the cluster operator deployed by CVO, this can be done at any time as CVO will need to wait for us to report availability. Make sure to keep in mind that everything has to be in place to report available status, then!
1 parent ee916ba commit 8145d8c

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

pkg/operator2/operator.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -177,17 +177,18 @@ func (c *authOperator) handleSync(operatorConfig *operatorv1.Authentication) err
177177
}
178178
resourceVersions = append(resourceVersions, route.GetResourceVersion())
179179

180-
serviceCA, servingCert, err := c.handleServiceCA()
180+
// make sure API server sees our metadata as soon as we've got a route with a host
181+
metadata, err := c.handleOAuthMetadata(route)
181182
if err != nil {
182183
return err
183184
}
184-
resourceVersions = append(resourceVersions, serviceCA.GetResourceVersion(), servingCert.GetResourceVersion())
185+
resourceVersions = append(resourceVersions, metadata.GetResourceVersion())
185186

186-
metadata, err := c.handleOAuthMetadata(route)
187+
serviceCA, servingCert, err := c.handleServiceCA()
187188
if err != nil {
188189
return err
189190
}
190-
resourceVersions = append(resourceVersions, metadata.GetResourceVersion())
191+
resourceVersions = append(resourceVersions, serviceCA.GetResourceVersion(), servingCert.GetResourceVersion())
191192

192193
authConfig, err := c.handleAuthConfig()
193194
if err != nil {

0 commit comments

Comments
 (0)