From 6eb3f60ec137f86e33f3214fdf0f8aad5a5410f9 Mon Sep 17 00:00:00 2001 From: xenolinux Date: Sat, 13 Apr 2024 00:18:04 +0530 Subject: [PATCH] OSDOCS#10246: Hosted control planes: Enabling feature gates --- _topic_maps/_topic_map.yml | 2 + .../hcp-using-feature-gates.adoc | 16 ++++++ modules/hcp-enable-feature-sets.adoc | 56 +++++++++++++++++++ 3 files changed, 74 insertions(+) create mode 100644 hosted_control_planes/hcp-using-feature-gates.adoc create mode 100644 modules/hcp-enable-feature-sets.adoc diff --git a/_topic_maps/_topic_map.yml b/_topic_maps/_topic_map.yml index 0570936eea..b6b4d67ba1 100644 --- a/_topic_maps/_topic_map.yml +++ b/_topic_maps/_topic_map.yml @@ -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 diff --git a/hosted_control_planes/hcp-using-feature-gates.adoc b/hosted_control_planes/hcp-using-feature-gates.adoc new file mode 100644 index 0000000000..234c2f7170 --- /dev/null +++ b/hosted_control_planes/hcp-using-feature-gates.adoc @@ -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]] diff --git a/modules/hcp-enable-feature-sets.adoc b/modules/hcp-enable-feature-sets.adoc new file mode 100644 index 0000000000..39da1aeb17 --- /dev/null +++ b/modules/hcp-enable-feature-sets.adoc @@ -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 -n +---- + +. 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: <1> + 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 +----