render: Remove install-config feature gate fallback#1649
Conversation
Replace manual install-config feature gate parsing with the standard operator render pattern: read the pre-resolved FeatureGate CR from rendered manifests via --rendered-manifest-files and --payload-version. The api-render step in bootkube.sh already resolves featureSet (e.g. TechPreviewNoUpgrade) into individual gates and writes the result into the FeatureGate CR status. Every other operator render (CKASO, CKCMO, MCO) reads this CR; the CEO was the only outlier that parsed feature gates directly from install-config, which led to bugs like missing featureSet resolution. When the new flags are provided, the FeatureGate CR is used as the authoritative source. When they are not yet available (before the coordinated installer change lands), a fallback resolves featureSet and featureGates from the install-config directly. Requires a coordinated installer change to pass the new flags to the etcd-render invocation in bootkube.sh.
Now that the installer passes --rendered-manifest-files and --payload-version to the etcd-render invocation, remove the install-config feature gate parsing fallback and make both flags required. This removes getFeatureGatesFromInstallConfig and the getFeatureGates dispatcher, leaving only the standard FeatureGate CR path.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: openshift/coderabbit/.coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (2)
WalkthroughRendering now requires rendered manifest paths and a payload version, reads FeatureGate resources from manifests, and derives enabled or disabled features through a payload-versioned accessor. Tests generate and pass corresponding FeatureGate manifests, including custom PKI coverage. ChangesManifest-based FeatureGate rendering
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant renderOpts
participant readFeatureGate
participant getFeatureGatesFromManifests
participant newTemplateData
renderOpts->>getFeatureGatesFromManifests: resolve FeatureGate status
getFeatureGatesFromManifests->>readFeatureGate: scan rendered manifest paths
readFeatureGate-->>getFeatureGatesFromManifests: return FeatureGate object
getFeatureGatesFromManifests-->>newTemplateData: return enabled and disabled feature sets
🚥 Pre-merge checks | ✅ 14 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (14 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 golangci-lint (2.12.2)Error: can't load config: unsupported version of the configuration: "" See https://golangci-lint.run/docs/product/migration-guide for migration instructions Comment |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
@sanchezl: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
Summary
Remove the install-config feature gate parsing fallback now that openshift/installer#10679 passes
--rendered-manifest-filesand--payload-versionto the etcd-render invocation.This makes both flags required and removes
getFeatureGatesFromInstallConfig()and thegetFeatureGates()dispatcher, leaving only the standard FeatureGate CR path viagetFeatureGatesFromManifests().Depends on
This PR should merge after both dependencies have landed.
Test plan
go test ./pkg/cmd/render/— all tests passgo vet ./pkg/cmd/render/— cleanSummary by CodeRabbit
FeatureGateresources directly, supporting both files and directories.