Skip to content

Commit 075812e

Browse files
committed
Cleaned up enhancement
1 parent 40795c9 commit 075812e

File tree

1 file changed

+31
-72
lines changed

1 file changed

+31
-72
lines changed

enhancements/okd/okd-featureset.md

Lines changed: 31 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,16 @@ This proposal introduces a new "OKD" feature set to the OpenShift API configurat
9898
#### Scenario 3: Attempting to change OKD feature set after enablement
9999

100100
1. OKD cluster administrator has a running cluster with `featureSet: OKD`
101-
2. Administrator attempts to change the feature set to "Default" or any other value
101+
2. Administrator attempts to change the feature set to "Default"
102102
3. The API validation rejects the change with error: "OKD may not be changed"
103103
4. The cluster continues operating with the OKD feature set
104104
5. The administrator must reinstall the cluster if a different feature set is required
105105

106+
#### Scenario 4: Attempting to Change OKD to TechPreviewNoUpgrade or DevPreviewNoUpgrade
107+
1. OKD cluster administrator has a running cluster with `featureSet: OKD`
108+
2. Administrator attempts to change the feature set to either "TechPreviewNoUpgrade" or "DevPreviewNoUpgrade"
109+
3. The cluster successfully changes to "TechPreviewNoUpgrade" or "DevPreviewNoUpgrade"
110+
106111
### API Extensions
107112

108113
This enhancement modifies the existing FeatureGate API in the `config.openshift.io/v1` API group:
@@ -111,8 +116,8 @@ This enhancement modifies the existing FeatureGate API in the `config.openshift.
111116

112117
**FeatureGate** resource modifications:
113118
- Adds new "OKD" value to the FeatureSet enum
114-
- Adds validation rule: `oldSelf == 'OKD' ? self == 'OKD' : true` to ensure immutability
115-
- Adds validation to prevent OKD from being enabled on OpenShift clusters
119+
- Adds validation rule: `oldSelf == 'OKD' ? self != '' : true` to ensure immutability
120+
- Adds validation to prevent OKD from being enabled on OpenShift clusters
116121

117122
#### CRD Manifests
118123

@@ -147,18 +152,8 @@ The following CRD manifests will be generated with OKD-specific variants:
147152

148153
And various operator-specific CRDs across multiple API groups.
149154

150-
Fill in the operational impact of these API Extensions in the "Operational Aspects of API Extensions" section.
151-
152155
### Topology Considerations
153156

154-
#### Hypershift / Hosted Control Planes
155-
156-
The OKD feature set is not currently designed for Hypershift deployments, as Hypershift is an OpenShift-specific topology and OKD clusters are typically deployed as standalone clusters. If Hypershift support is added to OKD in the future, the OKD feature set should:
157-
158-
- Be configurable at the HostedCluster level
159-
- Not affect the management cluster's feature set
160-
- Respect the same immutability and validation rules as standalone clusters
161-
162157
#### Standalone Clusters
163158

164159
The OKD feature set is specifically designed for standalone OKD clusters and is the primary use case for this enhancement. The feature set will be enabled by default during installation and cannot be changed afterwards.
@@ -183,14 +178,9 @@ The OKD feature set is defined in `config/v1/types_feature.go`:
183178

184179
```go
185180
const (
186-
// ... existing feature sets ...
187-
188-
// OKD turns on features for OKD.
189-
// Turning this feature set ON is supported for OKD clusters,
190-
// but NOT for OpenShift clusters.
191-
// This feature set CANNOT BE UNDONE for OKD clusters and
192-
// when enabled on OpenShift clusters, it PREVENTS UPGRADES.
193-
OKD FeatureSet = "OKD"
181+
// OKD turns on features for OKD. Turning this feature set ON is supported for OKD clusters, but NOT for OpenShift clusters.
182+
// Once enabled, this feature set cannot be changed back to Default, but can be changed to other feature sets and it allows upgrades.
183+
OKD FeatureSet = "OKD"
194184
)
195185
```
196186

@@ -212,29 +202,29 @@ The FeatureGate spec includes Kubernetes validation rules:
212202

213203
```go
214204
// +kubebuilder:validation:Enum=CustomNoUpgrade;DevPreviewNoUpgrade;TechPreviewNoUpgrade;OKD;""
215-
// +kubebuilder:validation:XValidation:rule="oldSelf == 'OKD' ? self == 'OKD' : true",message="OKD may not be changed"
205+
// +kubebuilder:validation:XValidation:rule="oldSelf == 'OKD' ? self != '' : true",message="OKD cannot transition to Default"
216206
```
217207

218208
This ensures:
219209
1. Only valid feature set values can be specified
220-
2. Once OKD is set, it cannot be changed to any other value
210+
2. Once OKD is set, it cannot be changed to default
221211

222212
#### Platform Detection
223213

224214
The installer and cluster operators must be able to detect whether they are running on OKD vs OpenShift to:
225-
- Automatically enable the OKD feature set during installation on OKD
215+
- Automatically enable the OKD feature set during installation on OKD clusters
226216
- Prevent the OKD feature set from being enabled on OpenShift
227217

228218
This detection is typically done through:
229-
- Build tags during compilation (`fcos` for OKD, `ocp` for OpenShift)
219+
- Build tags during compilation (`scos` for OKD, `ocp` for OpenShift)
230220
- Cluster version metadata
231221
- Installation metadata persisted during cluster creation
232222

233223
#### Feature Set Inheritance
234224

235-
The OKD feature set should inherit all features from the Default feature set, with the addition of selected TechPreview features that are deemed appropriate for community testing. The specific set of enabled features beyond Default will be determined by:
225+
The OKD feature set should inherit all features from the Default feature set, with the addition of selected TechPreview features that are deemed appropriate for community adoption. The specific set of enabled features beyond Default will be determined by:
236226

237-
1. Features that are stable enough for community testing
227+
1. Features that are stable enough for community adoption
238228
2. Features where early feedback would be valuable
239229
3. Features that align with OKD's mission as a community distribution
240230
4. Features that do not compromise cluster stability or security
@@ -256,10 +246,7 @@ CRD manifests with the OKD feature set variant are generated using the same tool
256246
**Risk:** Accidental enablement of the OKD feature set on OpenShift clusters could cause support issues.
257247

258248
**Mitigation:**
259-
- Implement strict API validation preventing OKD feature set on OpenShift
260-
- Include clear warnings in documentation
261-
- Prevent upgrades if OKD is somehow enabled on OpenShift
262-
- Ensure the installer only sets OKD feature set when building for OKD
249+
- Prevent OCP clusters from enabling the OKD featureset through validation in the OpenShift Kubernetes repo
263250

264251
**Risk:** Immutability of the OKD feature set could prevent administrators from recovering from configuration issues.
265252

@@ -269,13 +256,6 @@ CRD manifests with the OKD feature set variant are generated using the same tool
269256
- Ensure the default configuration is appropriate for most use cases
270257
- Consider providing an escape hatch for exceptional circumstances (future enhancement)
271258

272-
**Risk:** Version skew between OKD and OpenShift API definitions could cause compatibility issues.
273-
274-
**Mitigation:**
275-
- Keep the openshift/api repository in sync between OKD and OpenShift builds
276-
- Automated CI testing for both OKD and OpenShift builds from the same codebase
277-
- Regular integration testing of OKD with latest OpenShift API changes
278-
279259
### Drawbacks
280260

281261
**Divergence between OKD and OpenShift:** Introducing an OKD-specific feature set creates a divergence point between the community and commercial distributions. However, this is intentional and aligns with OKD's role as a proving ground for new features.
@@ -298,18 +278,7 @@ Instead of creating a new OKD feature set, we could modify the TechPreviewNoUpgr
298278
- API contracts would be violated (TechPreviewNoUpgrade explicitly blocks upgrades)
299279
- Difficult to maintain and reason about platform-specific behavior
300280

301-
### Alternative 2: Allow OKD Feature Set to be Mutable
302-
303-
Allow the OKD feature set to be changed to other feature sets after initial enablement.
304-
305-
**Rejected because:**
306-
- Changing feature sets can have unpredictable effects on cluster stability
307-
- Feature gates may enable or disable functionality that affects stored data or configurations
308-
- Maintaining consistency across feature set transitions would be complex
309-
- Other feature sets are also immutable, and we should maintain consistency
310-
- If users need a different feature set, cluster reinstallation is clearer and safer
311-
312-
### Alternative 3: Use CustomNoUpgrade for OKD
281+
### Alternative 2: Use CustomNoUpgrade for OKD
313282

314283
Instead of creating a dedicated OKD feature set, use the existing CustomNoUpgrade feature set for OKD clusters.
315284

@@ -320,14 +289,14 @@ Instead of creating a dedicated OKD feature set, use the existing CustomNoUpgrad
320289
- Does not provide a default, curated experience for OKD users
321290
- Makes it harder to manage and communicate what features are enabled on OKD
322291

323-
### Alternative 4: Create an OKDTechPreview Feature Set
292+
### Alternative 3: Create an OKDTechPreview Feature Set
324293

325294
Create a separate OKDTechPreview feature set in addition to the OKD feature set to allow OKD users to choose between stable and experimental features.
326295

327296
**Rejected because:**
328297
- Adds unnecessary complexity with multiple OKD-specific feature sets
329298
- The OKD feature set can already include appropriate TechPreview features
330-
- OKD's role as a community distribution means users expect to test new features
299+
- OKD's role as a community distribution means users expect to adopt new features
331300
- Can be reconsidered in the future if the use case becomes clearer
332301

333302
## Open Questions [optional]
@@ -478,7 +447,7 @@ The OKD feature set introduces changes to the FeatureGate API and generates nume
478447
- CRD manifests are loaded at API server startup and do not affect runtime performance
479448

480449
**Validation Performance:**
481-
- The immutability validation (`oldSelf == 'OKD' ? self == 'OKD' : true`) is a simple comparison
450+
- The kubebuilder validation (`oldSelf == 'OKD' ? self != '' : true`) is a simple comparison
482451
- Executed only when FeatureGate resources are modified (infrequent operation)
483452
- No measurable impact on API throughput or latency
484453

@@ -513,19 +482,13 @@ The OKD feature set itself does not introduce new SLIs, but relies on existing i
513482
- **Detection:** API server logs show validation errors; CLI commands return error messages
514483
- **Recovery:** Correct the feature set value to a valid option (Default, TechPreviewNoUpgrade, CustomNoUpgrade, OKD, or empty string)
515484

516-
**Failure Mode 2: Attempt to change OKD feature set**
517-
- **Symptom:** API server rejects update with error "OKD may not be changed"
518-
- **Impact:** Cluster administrators cannot change the feature set from OKD to another value
485+
**Failure Mode 2: Attempt to change OKD feature set to Default**
486+
- **Symptom:** API server rejects update with error "OKD cannot be transitioned to Default"
487+
- **Impact:** Cluster administrators cannot change the feature set from OKD to default
519488
- **Detection:** API server logs show validation errors; CLI commands return error messages
520-
- **Recovery:** This is expected behavior; cluster must be reinstalled if a different feature set is required
521-
522-
**Failure Mode 3: OKD feature set enabled on OpenShift cluster**
523-
- **Symptom:** Cluster upgrades are blocked; warnings appear in cluster-version-operator logs
524-
- **Impact:** Cluster cannot upgrade; may be out of compliance with support policies
525-
- **Detection:** CVO logs show warnings about unsupported feature set; upgrade attempts fail
526-
- **Recovery:** Reinstall the cluster with the appropriate feature set for OpenShift (typically Default or empty)
489+
- **Recovery:** This is expected behavior; cluster must be reinstalled if a the default featureset is required
527490

528-
**Failure Mode 4: Version skew in component awareness of OKD feature set**
491+
**Failure Mode 3: Version skew in component awareness of OKD feature set**
529492
- **Symptom:** Components fail to start or report degraded status due to unknown feature set value
530493
- **Impact:** Specific operators or components may not function correctly
531494
- **Detection:** Operator logs show errors about unknown feature set; operator conditions show Degraded=True
@@ -582,12 +545,6 @@ oc adm node-logs --role=master --path=kube-apiserver/audit.log | grep -i feature
582545
3. Reinstall the cluster with the desired feature set
583546
4. Restore applications and data to the new cluster
584547

585-
**If OKD feature set was accidentally enabled on an OpenShift cluster:**
586-
1. The cluster will block upgrades and may be unsupported
587-
2. Reinstallation is the only supported path to recovery
588-
3. If the cluster is newly installed, reinstall before deploying workloads
589-
4. If the cluster has workloads, plan a migration to a properly configured cluster
590-
591548
### Graceful Degradation
592549

593550
The OKD feature set validation is enforced at the API level:
@@ -618,7 +575,7 @@ The OKD feature set validation is enforced at the API level:
618575

619576
**Build Infrastructure:**
620577
- No changes needed; existing OKD build infrastructure can accommodate this change
621-
- The `fcos` build tag will continue to differentiate OKD from OpenShift builds
578+
- The `scos` build tag will continue to differentiate OKD from OpenShift builds
622579

623580
**Documentation:**
624581
- Update OKD installation documentation to explain the OKD feature set
@@ -628,7 +585,9 @@ The OKD feature set validation is enforced at the API level:
628585

629586
**Repository Infrastructure:**
630587
- No new repositories required
631-
- Changes are made to existing openshift/api repository
588+
- Changes are made to existing openshift/api repository and will be vendored to other repos
589+
- The OpenShift Kubernetes repo will need changes
590+
- The Cluster Config Operator repo will need changes to allow the OKD featureset to allow upgrades
632591
- Generated CRD manifests will be committed to the repository
633592

634593
## Implementation History

0 commit comments

Comments
 (0)