Uploaded image for project: 'OpenShift Over the Air'
  1. OpenShift Over the Air
  2. OTA-1531

Read OCP version of executing CVO early to properly set up FeatureGate

XMLWordPrintable

    • Icon: Story Story
    • Resolution: Done
    • Icon: Normal Normal
    • None
    • None
    • None
    • None
    • False
    • Hide

      None

      Show
      None
    • False
    • 3
    • None
    • None
    • OTA 270, OTA 271, OTA 272, OTA 273

      In OCP, CVO mainly plays supporting / enforcing role in how Feature Gated behavior is enabled or disabled in the cluster. It reads the FeatureGate resource in the cluster, determines the enabled FeatureSet (one of Default, TechPreviewNoUpgrade, DevPreviewNoUpgrade or CustomNoUpgrade) and uses this to determine which payload manifests to apply to the cluster.

      Recently, CVO started to have a FeatureGate-enabled behaviors on its own, and has to determine whether individual gates are enabled or not, to modify its own behavior directly. Feature gate enablement is tied to a version and controller by the config-operator . The operators usually read their version from the environmental variable (where oc adm release new places it when building a release payload image for the given version), then read the FeatureGate resource which contains a list of enabled/disabled gates for each version (docs)

      CVO cannot use this approach (it does not and cannot have the version exposed to itself by oc adm release new , see OCPBUGS-30080). CVO has access to the filesystem of the release payload image (it is shipped and executed through release payload image), so it has access to the release metadata, containing its version - same one as the one typically provided to operators through version placeholders at release build time. The current caveat is that loading the payload is done quite late in the CVO execution. The result of this is that the gated behavior knowledge is not available until this happens. This is now guarded by the awkward mechanism that makes CVO panic if the code asks about a gate enablement before the necessary information is read.

      Definition of Done

      • CVO code is refactored so that it reads the payload metadata version earlier in the execution
      • Only payload metadata are read, not the full payload (with tasks etc). Actual payload to reconcile should be fully loaded (including validation etc)
      • Construct the feature gate check earlier and get rid of the "before use" panicking guard
      • If the payload metadata fail to be read, run in the default UnknownVersion mode (like it does now)

              afri@afri.cz Petr Muller
              afri@afri.cz Petr Muller
              None
              None
              Jian Li Jian Li
              None
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: