-
Bug
-
Resolution: Unresolved
-
Normal
-
None
-
4.18.0
-
Moderate
-
None
-
False
-
Description of problem:
CVO manifests contain some feature-gated ones:
- since at least 4.16, there are feature-gated ClusterVersion CRDs
- UpdateStatus API feature is delivered through DevPreview (now) and TechPreview (later) feature set
We observed HyperShift CI jobs to fail when adding DevPreview-gated deployment manifests to CVO, which was unexpected. Investigating further, we discovered that HyperShift applies them:
error: error parsing /var/payload/manifests/0000_00_update-status-controller_03_deployment-DevPreviewNoUpgrade.yaml: error converting YAML to JSON: yaml: invalid map key: map[interface {}]interface {}{".ReleaseImage":interface {}(nil)}
But even without these added manifests, this happens for existing ClusterVersion CRD manifests present in the payload:
$ ls -1 manifests/*clusterversions*crd.yaml manifests/0000_00_cluster-version-operator_01_clusterversions-CustomNoUpgrade.crd.yaml manifests/0000_00_cluster-version-operator_01_clusterversions-Default.crd.yaml manifests/0000_00_cluster-version-operator_01_clusterversions-DevPreviewNoUpgrade.crd.yaml manifests/0000_00_cluster-version-operator_01_clusterversions-TechPreviewNoUpgrade.crd.yaml
In a passing HyperShift CI job, the same log shows that all four manifests are applied instead of just one:
customresourcedefinition.apiextensions.k8s.io/clusterversions.config.openshift.io created customresourcedefinition.apiextensions.k8s.io/clusterversions.config.openshift.io configured customresourcedefinition.apiextensions.k8s.io/clusterversions.config.openshift.io configured customresourcedefinition.apiextensions.k8s.io/clusterversions.config.openshift.io configured
Version-Release number of selected component (if applicable):
4.18
How reproducible:
Always
Steps to Reproduce:
1. inspect the cluster-version-operator-*-bootstrap.log of a HyperShift CI job
Actual results:
customresourcedefinition.apiextensions.k8s.io/clusterversions.config.openshift.io created customresourcedefinition.apiextensions.k8s.io/clusterversions.config.openshift.io configured customresourcedefinition.apiextensions.k8s.io/clusterversions.config.openshift.io configured customresourcedefinition.apiextensions.k8s.io/clusterversions.config.openshift.io configured
= all four ClusterVersion CRD manifests are applied
Expected results:
customresourcedefinition.apiextensions.k8s.io/clusterversions.config.openshift.io created
= ClusterVersion CRD manifest is applied just once
Additional info
I'm filing this card so that I can link it to the "easy" fix https://github.com/openshift/hypershift/pull/5093 which is not the perfect fix, but allows us to add featureset-gated manifests to CVO without breaking HyperShift. It is desirable to improve this even further and actually correctly select the manifests to be applied for CVO bootstrap, but that involves non-trivial logic similar to one used by CVO and it seems to be better approached as a feature to be properly assessed and implemented, rather than a bugfix, so I'll file a separate HOSTEDCP card for that.
- blocks
-
OTA-1269 Scaffold the status API controller
- Code Review
- links to