-
Notifications
You must be signed in to change notification settings - Fork 1.9k
docs: Document CustomNoUpgrade featureSet in the feature gates user guide #112545
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
nikhilprajapati-world
wants to merge
2
commits into
openshift:main
Choose a base branch
from
nikhilprajapati-world:docs/custom-no-upgrade-feature-gate-guide
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
106 changes: 106 additions & 0 deletions
106
modules/nodes-cluster-enabling-features-cli-custom.adoc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,106 @@ | ||
| // Module included in the following assemblies: | ||
| // | ||
| // * nodes/cluster/nodes-cluster-enabling-features.adoc | ||
|
|
||
| :_mod-docs-content-type: PROCEDURE | ||
| [id="nodes-cluster-enabling-features-cli-custom_{context}"] | ||
| = Enabling individual feature gates using the CustomNoUpgrade feature set | ||
|
|
||
| [role="_abstract"] | ||
| You can use the {oc-first} to enable or disable individual feature gates on your cluster by setting the `CustomNoUpgrade` feature set on the `FeatureGate` custom resource (CR). Unlike `TechPreviewNoUpgrade`, which enables all Technology Preview features, `CustomNoUpgrade` gives you granular control over individual feature gates. | ||
|
|
||
| [WARNING] | ||
| ==== | ||
| Enabling the `CustomNoUpgrade` feature set on your cluster cannot be undone and prevents minor version updates. Once applied, you cannot revert the `featureSet` field back to its default value. You can continue to modify the individual gates within `customNoUpgrade.enabled` and `customNoUpgrade.disabled`, but the `CustomNoUpgrade` feature set itself is permanent. | ||
|
|
||
| This feature set is not supported for production clusters. Because of its nature, this setting cannot be validated. If you have any typos or accidentally apply invalid combinations, your cluster may fail in an unrecoverable way. | ||
| ==== | ||
|
|
||
| .Prerequisites | ||
|
|
||
| * You have installed the {oc-first}. | ||
| * You have cluster administrator privileges. | ||
|
|
||
| .Procedure | ||
|
|
||
| . Enable a specific feature gate by patching the `FeatureGate` CR: | ||
| + | ||
| [source,terminal] | ||
| ---- | ||
| $ oc patch featuregate cluster --type=merge -p \ | ||
| '{"spec":{"featureSet":"CustomNoUpgrade","customNoUpgrade":{"enabled":["<feature_gate_name>"]}}}' | ||
| ---- | ||
| + | ||
| where `<feature_gate_name>` is the name of the feature gate you want to enable, for example `ClusterAPIMachineManagement`. The `spec.customNoUpgrade.enabled` field accepts a string array. Each element is a feature gate name as a plain string. Do not use the object format `{"name": "FeatureGateName"}`, which appears in `status.featureGates` but is not valid for the spec. | ||
|
|
||
| . To enable multiple feature gates at once: | ||
| + | ||
| [source,terminal] | ||
| ---- | ||
| $ oc patch featuregate cluster --type=merge -p \ | ||
| '{"spec":{"featureSet":"CustomNoUpgrade","customNoUpgrade":{"enabled":["<feature_gate_1>","<feature_gate_2>"]}}}' | ||
| ---- | ||
|
|
||
| . To remove a previously enabled feature gate from the enabled list: | ||
| + | ||
| [source,terminal] | ||
| ---- | ||
| $ oc patch featuregate cluster --type=merge -p \ | ||
| '{"spec":{"customNoUpgrade":{"enabled":[]}}}' | ||
| ---- | ||
| + | ||
| [NOTE] | ||
| ==== | ||
| This removes all individually enabled gates but does not revert the `CustomNoUpgrade` feature set. The cluster remains on `CustomNoUpgrade` and minor version upgrades remain blocked. | ||
| ==== | ||
|
|
||
| . Alternatively, you can enable the feature set by editing the `FeatureGate` CR directly: | ||
| + | ||
| [source,terminal] | ||
| ---- | ||
| $ oc edit featuregate cluster | ||
| ---- | ||
| + | ||
| .Sample FeatureGate custom resource with CustomNoUpgrade | ||
| [source,yaml] | ||
| ---- | ||
| apiVersion: config.openshift.io/v1 | ||
| kind: FeatureGate | ||
| metadata: | ||
| name: cluster | ||
| spec: | ||
| featureSet: CustomNoUpgrade | ||
| customNoUpgrade: | ||
| enabled: | ||
| - <feature_gate_name> | ||
| disabled: | ||
| - <feature_gate_name> | ||
| ---- | ||
| where: | ||
| + | ||
| -- | ||
| `spec.featureSet`:: Must be set to `CustomNoUpgrade` to use the `customNoUpgrade` field. | ||
| `spec.customNoUpgrade.enabled`:: A list of feature gate names to enable, specified as plain strings. | ||
| `spec.customNoUpgrade.disabled`:: Optional. A list of feature gate names to explicitly disable. | ||
| -- | ||
| + | ||
| After you save the changes, new machine configs are created, the machine config pools are updated, and scheduling on each node is disabled while the change is being applied. | ||
|
|
||
| [NOTE] | ||
| ==== | ||
| The syntax for enabling feature gates differs between the `install-config.yaml` file and the `FeatureGate` CR: | ||
|
|
||
| * In `install-config.yaml`, use `featureGates: ["<feature_gate_name>=true"]` | ||
| * In the `FeatureGate` CR at runtime, use `customNoUpgrade.enabled: ["<feature_gate_name>"]` | ||
| ==== | ||
|
|
||
| .Verification | ||
|
|
||
| include::snippets/nodes-cluster-enabling-features-verification.adoc[] | ||
|
|
||
| You can also verify the enabled feature gates by checking the `FeatureGate` CR status: | ||
|
|
||
| [source,terminal] | ||
| ---- | ||
| $ oc get featuregate cluster -o jsonpath='{.status.featureGates[0].enabled[*].name}' | tr ' ' '\n' | ||
| ---- | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤖 [error] AsciiDocDITA.TaskStep: Content other than a single list cannot be mapped to DITA steps.