@@ -180,11 +180,11 @@ func (c *authOperator) handleSync(operatorConfig *operatorv1.Authentication) err
180
180
}
181
181
resourceVersions = append (resourceVersions , route .GetResourceVersion ())
182
182
183
- serviceCA , err := c .handleServiceCA ()
183
+ serviceCA , servingCert , err := c .handleServiceCA ()
184
184
if err != nil {
185
185
return err
186
186
}
187
- resourceVersions = append (resourceVersions , serviceCA .GetResourceVersion ())
187
+ resourceVersions = append (resourceVersions , serviceCA .GetResourceVersion (), servingCert . GetResourceVersion () )
188
188
189
189
metadata , _ , err := resourceapply .ApplyConfigMap (c .configMaps , c .recorder , getMetadataConfigMap (route ))
190
190
if err != nil {
@@ -235,9 +235,14 @@ func (c *authOperator) handleSync(operatorConfig *operatorv1.Authentication) err
235
235
}
236
236
resourceVersions = append (resourceVersions , cliConfig .GetResourceVersion ())
237
237
238
+ operatorDeploymentRV , err := c .getOperatorDeploymentResourceVersion ()
239
+ if err != nil {
240
+ return err
241
+ }
242
+ resourceVersions = append (resourceVersions , operatorDeploymentRV )
243
+
238
244
// deployment, have RV of all resources
239
245
// TODO use ExpectedDeploymentGeneration func
240
- // TODO we also need the RV for the serving-cert secret (servingCertName)
241
246
expectedDeployment := defaultDeployment (
242
247
operatorConfig ,
243
248
syncData ,
@@ -284,3 +289,13 @@ func getPrefixFilter() controller.Filter {
284
289
DeleteFunc : prefix ,
285
290
}
286
291
}
292
+
293
+ func (c * authOperator ) getOperatorDeploymentResourceVersion () (string , error ) {
294
+ deployments := c .deployments .Deployments (targetNameOperator )
295
+ operator , err := deployments .Get (targetNameOperator , metav1.GetOptions {})
296
+ if err != nil {
297
+ return "" , err
298
+ }
299
+
300
+ return operator .GetResourceVersion (), nil
301
+ }
0 commit comments