Skip to content

Commit 293ee72

Browse files
committed
pkg/cvo: Create periodic check for configuration file
Right now, a placeholder log is present. The log will be exchanged with the actual logic to sync the configuration file later on.
1 parent f463bd6 commit 293ee72

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

pkg/cvo/cvo.go

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@ func (optr *Operator) Run(runContext context.Context, shutdownContext context.Co
468468
resultChannel <- asyncResult{name: "available updates"}
469469
}()
470470

471-
if optr.shouldReconcileCVOConfiguration() {
471+
if optr.shouldReconcileCVOConfiguration() && optr.configFile == "" {
472472
resultChannelCount++
473473
go func() {
474474
defer utilruntime.HandleCrash()
@@ -482,7 +482,20 @@ func (optr *Operator) Run(runContext context.Context, shutdownContext context.Co
482482
resultChannel <- asyncResult{name: "cvo configuration"}
483483
}()
484484
} else {
485-
klog.Infof("The ClusterVersionOperatorConfiguration feature gate is disabled or HyperShift is detected; the configuration sync routine will not run.")
485+
klog.Infof("The ClusterVersionOperatorConfiguration feature gate is disabled, HyperShift is detected or --config-file flag is used; the configuration sync routine will not run.")
486+
}
487+
488+
if optr.enabledFeatureGates.CVOConfiguration() && optr.configFile != "" {
489+
resultChannelCount++
490+
go func() {
491+
defer utilruntime.HandleCrash()
492+
wait.UntilWithContext(runContext, func(_ context.Context) {
493+
klog.V(4).Infof("Syncing configuration file")
494+
}, time.Second*15)
495+
resultChannel <- asyncResult{name: "cvo configuration file"}
496+
}()
497+
} else {
498+
klog.Infof("The ClusterVersionOperatorConfiguration feature gate is disabled or --config-file flag is not used; the configuration file sync routine will not run.")
486499
}
487500

488501
resultChannelCount++

0 commit comments

Comments
 (0)