1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 12:46:18 +01:00

OSDOCS#10246: Hosted control planes: Enabling feature gates

This commit is contained in:
xenolinux
2024-04-13 00:18:04 +05:30
committed by openshift-cherrypick-robot
parent c64b370d9e
commit 6eb3f60ec1
3 changed files with 74 additions and 0 deletions

View File

@@ -2313,6 +2313,8 @@ Topics:
File: hcp-getting-started
- Name: Managing hosted control planes
File: hcp-managing
- Name: Using feature gates in a hosted cluster
File: hcp-using-feature-gates
- Name: Backup, restore, and disaster recovery for hosted control planes
File: hcp-backup-restore-dr
- Name: Troubleshooting hosted control planes

View File

@@ -0,0 +1,16 @@
:_mod-docs-content-type: ASSEMBLY
[id="hcp-using-feature-gates"]
= Using feature gates in a hosted cluster
include::_attributes/common-attributes.adoc[]
:context: hcp-using-feature-gates
toc::[]
You can use feature gates in a hosted cluster to enable features that are not part of the default set of features. You can enable the `TechPreviewNoUpgrade` feature set by using feature gates in your hosted cluster.
include::modules/hcp-enable-feature-sets.adoc[leveloffset=+1]
[role="_additional-resources"]
.Additional resources
* xref:../rest_api/config_apis/featuregate-config-openshift-io-v1.adoc#featuregate-config-openshift-io-v1[FeatureGate [config.openshift.io/v1]]

View File

@@ -0,0 +1,56 @@
// Module included in the following assemblies:
//
// * hosted_control_planes/hcp-using-feature-gates.adoc
:_mod-docs-content-type: PROCEDURE
[id="hcp-enable-feature-sets_{context}"]
= Enabling feature sets by using feature gates
You can enable the `TechPreviewNoUpgrade` feature set in a hosted cluster by editing the `HostedCluster` custom resource (CR) with the OpenShift CLI.
.Prerequisites
* You installed the OpenShift CLI (`oc`).
.Procedure
. Open the `HostedCluster` CR for editing on the hosting cluster by running the following command:
+
[source,terminal]
----
$ oc edit <hosted_cluster_name> -n <hosted_cluster_namespace>
----
. Define the feature set by entering a value in the `featureSet` field. For example:
+
[source,yaml]
----
apiVersion: hypershift.openshift.io/v1beta1
kind: HostedCluster
metadata:
name: <hosted_cluster_name> <1>
namespace: <hosted_cluster_namespace> <2>
spec:
configuration:
featureGate:
featureSet: TechPreviewNoUpgrade <3>
----
<1> Specifies your hosted cluster name.
<2> Specifies your hosted cluster namespace.
<3> This feature set is a subset of the current Technology Preview features.
+
[WARNING]
====
Enabling the `TechPreviewNoUpgrade` feature set on your cluster cannot be undone and prevents minor version updates. This feature set allows you to enable these Technology Preview features on test clusters, where you can fully test them. Do not enable this feature set on production clusters.
====
. Save the file to apply the changes.
.Verification
* Verify that the `TechPreviewNoUpgrade` feature gate is enabled in your hosted cluster by running the following command:
+
[source,terminal]
----
$ oc get featuregate cluster -o yaml
----