Skip to content

Commit

Permalink
pkg/start: Log and continue when we fail to retrieve the feature gate
Browse files Browse the repository at this point in the history
From the enhancement [1]:

  During bootstrapping, the CVO will assume no feature sets are
  enabled until it can successfully retrieve
  `featuregates.config.openshift.io` from the Kubernetes API server.

So this softens the error from 18dd189 (simplify includeTechPreview
flag to be a static bool, 2021-11-22, #694) to be log-and-continue.
If it turns out that we actually were TechPreviewNoUpgrade, the
TechPreviewChangeStopper controller will eventually succeed in pulling
the feature-gate, notice, and ask the CVO to shut down.  In the
meantime, the CVO will have been able to get a head start on
reconciling the vast majority of manifests which are not tech-preview.

[1]: https://github.com/openshift/enhancements/blame/f74ffe7776f40dbd096b9ca10c27ee7a0a579e58/enhancements/update/cvo-techpreview-manifests.md#L70-L71
  • Loading branch information
wking committed Dec 7, 2021
1 parent bbc00e4 commit 90b1454
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/start/start.go
Expand Up @@ -142,7 +142,7 @@ func (o *Options) Run(ctx context.Context) error {
case apierrors.IsNotFound(err):
includeTechPreview = false // if we have no featuregates, then we aren't tech preview
case err != nil:
return fmt.Errorf("error getting featuregate value: %v", err)
klog.Warningf("Error getting featuregate value: %v", err)
default:
includeTechPreview = gate.Spec.FeatureSet == configv1.TechPreviewNoUpgrade
}
Expand Down

0 comments on commit 90b1454

Please sign in to comment.