Skip to content

Commit 9c7f05a

Browse files
authored
Merge pull request #74617 from xenolinux/hcp-feature-gate
OSDOCS#10246: Hosted control planes: Enabling feature gates
2 parents 266cbbf + 6256437 commit 9c7f05a

File tree

3 files changed

+74
-0
lines changed

3 files changed

+74
-0
lines changed

_topic_maps/_topic_map.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2314,6 +2314,8 @@ Topics:
23142314
File: hcp-getting-started
23152315
- Name: Managing hosted control planes
23162316
File: hcp-managing
2317+
- Name: Using feature gates in a hosted cluster
2318+
File: hcp-using-feature-gates
23172319
- Name: Backup, restore, and disaster recovery for hosted control planes
23182320
File: hcp-backup-restore-dr
23192321
- Name: Troubleshooting hosted control planes
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
:_mod-docs-content-type: ASSEMBLY
2+
[id="hcp-using-feature-gates"]
3+
= Using feature gates in a hosted cluster
4+
include::_attributes/common-attributes.adoc[]
5+
:context: hcp-using-feature-gates
6+
7+
toc::[]
8+
9+
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.
10+
11+
include::modules/hcp-enable-feature-sets.adoc[leveloffset=+1]
12+
13+
[role="_additional-resources"]
14+
.Additional resources
15+
16+
* xref:../rest_api/config_apis/featuregate-config-openshift-io-v1.adoc#featuregate-config-openshift-io-v1[FeatureGate [config.openshift.io/v1]]

modules/hcp-enable-feature-sets.adoc

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * hosted_control_planes/hcp-using-feature-gates.adoc
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="hcp-enable-feature-sets_{context}"]
7+
= Enabling feature sets by using feature gates
8+
9+
You can enable the `TechPreviewNoUpgrade` feature set in a hosted cluster by editing the `HostedCluster` custom resource (CR) with the OpenShift CLI.
10+
11+
.Prerequisites
12+
13+
* You installed the OpenShift CLI (`oc`).
14+
15+
.Procedure
16+
17+
. Open the `HostedCluster` CR for editing on the hosting cluster by running the following command:
18+
+
19+
[source,terminal]
20+
----
21+
$ oc edit <hosted_cluster_name> -n <hosted_cluster_namespace>
22+
----
23+
24+
. Define the feature set by entering a value in the `featureSet` field. For example:
25+
+
26+
[source,yaml]
27+
----
28+
apiVersion: hypershift.openshift.io/v1beta1
29+
kind: HostedCluster
30+
metadata:
31+
name: <hosted_cluster_name> <1>
32+
namespace: <hosted_cluster_namespace> <2>
33+
spec:
34+
configuration:
35+
featureGate:
36+
featureSet: TechPreviewNoUpgrade <3>
37+
----
38+
<1> Specifies your hosted cluster name.
39+
<2> Specifies your hosted cluster namespace.
40+
<3> This feature set is a subset of the current Technology Preview features.
41+
+
42+
[WARNING]
43+
====
44+
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.
45+
====
46+
47+
. Save the file to apply the changes.
48+
49+
.Verification
50+
51+
* Verify that the `TechPreviewNoUpgrade` feature gate is enabled in your hosted cluster by running the following command:
52+
+
53+
[source,terminal]
54+
----
55+
$ oc get featuregate cluster -o yaml
56+
----

0 commit comments

Comments
 (0)