@@ -180,19 +180,22 @@ type Operator struct {
180180 // to select the manifests that will be applied in the cluster. The starting value cannot be changed in the executing
181181 // CVO but the featurechangestopper controller will detect a feature set change in the cluster and shutdown the CVO.
182182 // Enforcing featuresets is a standard GA CVO behavior that supports the feature gating functionality across the whole
183- // cluster, as opposed to the enabledFeatureGates which controls what gated behaviors of CVO itself are enabled by
183+ // cluster, as opposed to the enabledCVOFeatureGates which controls what gated behaviors of CVO itself are enabled by
184184 // the cluster feature gates.
185185 // See: https://github.com/openshift/enhancements/blob/master/enhancements/update/cvo-techpreview-manifests.md
186186 requiredFeatureSet configv1.FeatureSet
187187
188- // enabledFeatureGates is the checker for what gated CVO behaviors are enabled or disabled by specific cluster-level
188+ // enabledCVOFeatureGates is the checker for what gated CVO behaviors are enabled or disabled by specific cluster-level
189189 // feature gates. It allows multiplexing the cluster-level feature gates to more granular CVO-level gates. Similarly
190- // to the requiredFeatureSet, the enabledFeatureGates cannot be changed in the executing CVO but the
190+ // to the requiredFeatureSet, the enabledCVOFeatureGates cannot be changed in the executing CVO but the
191191 // featurechangestopper controller will detect when cluster feature gate config changes and shutdown the CVO.
192- enabledFeatureGates featuregates.CvoGateChecker
192+ enabledCVOFeatureGates featuregates.CvoGateChecker
193193
194194 // featureGatesMutex protects access to enabledManifestFeatureGates
195- featureGatesMutex sync.RWMutex
195+ featureGatesMutex sync.RWMutex
196+ // enabledManifestFeatureGates is the set of feature gates that are currently enabled for the manifests that are applied to the cluster.
197+ // This is the full set of enabled feature gates extracted from the FeatureGate object.
198+ // We use this set as a filter to determine which of the manifests from the payload should or should not be applied to the cluster.
196199 enabledManifestFeatureGates sets.Set [string ]
197200
198201 clusterProfile string
@@ -267,7 +270,7 @@ func New(
267270 injectClusterIdIntoPromQL : injectClusterIdIntoPromQL ,
268271
269272 requiredFeatureSet : featureSet ,
270- enabledFeatureGates : cvoGates ,
273+ enabledCVOFeatureGates : cvoGates ,
271274 enabledManifestFeatureGates : startingEnabledManifestFeatureGates ,
272275
273276 alwaysEnableCapabilities : alwaysEnableCapabilities ,
@@ -1159,18 +1162,18 @@ func (optr *Operator) extractEnabledGates(featureGate *configv1.FeatureGate) set
11591162 currentVersion := optr .currentVersion ().Version
11601163 if currentVersion == "" {
11611164 klog .Warningf ("Payload has not been initialized yet, using the operator version %s" , optr .enabledCVOFeatureGates .DesiredVersion ())
1162- currentVersion = optr .enabledFeatureGates .DesiredVersion ()
1165+ currentVersion = optr .enabledCVOFeatureGates .DesiredVersion ()
11631166 }
11641167
11651168 return featuregates .ExtractEnabledGates (featureGate , currentVersion )
11661169}
11671170
11681171// shouldReconcileCVOConfiguration returns whether the CVO should reconcile its configuration using the API server.
11691172//
1170- // enabledFeatureGates must be initialized before the function is called.
1173+ // enabledCVOFeatureGates must be initialized before the function is called.
11711174func (optr * Operator ) shouldReconcileCVOConfiguration () bool {
11721175 // The relevant CRD and CR are not applied in HyperShift, which configures the CVO via a configuration file
1173- return optr .enabledFeatureGates .CVOConfiguration () && ! optr .hypershift
1176+ return optr .enabledCVOFeatureGates .CVOConfiguration () && ! optr .hypershift
11741177}
11751178
11761179// shouldReconcileAcceptRisks returns whether the CVO should reconcile spec.desiredUpdate.acceptRisks and populate the
0 commit comments