|
| 1 | +// Module included in the following assemblies: |
| 2 | +// |
| 3 | +// microshift_configuring/microshift-feature-gates.adoc |
| 4 | + |
| 5 | +:_mod-docs-content-type: PROCEDURE |
| 6 | +[id="microshift-feature-gates-using_{context}"] |
| 7 | += Using feature gates for {microshift-short} |
| 8 | + |
| 9 | +[role="_abstract"] |
| 10 | +To use feature gates in your development environment, you must specify them in the `config.yaml` file or create a configuration snippet file. You must also configure the feature set you want to work with. |
| 11 | + |
| 12 | +[IMPORTANT] |
| 13 | +==== |
| 14 | +* A `config.yaml` configuration file takes precedence over built-in settings. The `config.yaml` file is read every time the {microshift-short} service starts. |
| 15 | +* Configuration snippet YAMLs take precedence over both built-in settings and the `config.yaml` configuration file. |
| 16 | +* After you enable feature gates, you cannot disable them. |
| 17 | +==== |
| 18 | + |
| 19 | +.Prerequisites |
| 20 | + |
| 21 | +* You installed {microshift-short}. |
| 22 | +* You installed the `oc-first`. |
| 23 | +* You have `sudo` privileges on the {microshift-short} host. |
| 24 | +
|
| 25 | +.Procedure |
| 26 | + |
| 27 | +. Apply features gates in one of the two following ways: |
| 28 | + |
| 29 | +.. Update the {microshift-short} `config.yaml` configuration file by making a copy of the provided `config.yaml.default` file in the `/etc/microshift/` directory. Name it `config.yaml` and keep it in the source directory. |
| 30 | + |
| 31 | +.. Use a configuration snippet to apply the ingress control settings you want. To do this, create a configuration snippet YAML file and put it in the `/etc/microshift/config.d/` configuration directory. For example, `/etc/microshift/config.d/10-fg.yaml`. |
| 32 | + |
| 33 | +. Replace the default values in the `xyz` section of the {microshift-short} YAML with your valid values, or create a configuration snippet file with the sections you need. |
| 34 | ++ |
| 35 | +.Feature gates configuration with example values |
| 36 | +[source,yaml] |
| 37 | +---- |
| 38 | +# ... |
| 39 | +apiServer: |
| 40 | + featureGates: |
| 41 | + featureSet: TechPreviewNoUpgrade |
| 42 | +# ... |
| 43 | +apiServer: |
| 44 | + featureGates: |
| 45 | + featureSet: CustomNoUpgrade |
| 46 | + customNoUpgrade: |
| 47 | + enabled: |
| 48 | + - "CPUManagerPolicyAlphaOptions" |
| 49 | + - "MemoryQoS" |
| 50 | + disabled: |
| 51 | + - "SomeDefaultEnabledFeature" |
| 52 | +# ... |
| 53 | +---- |
| 54 | + |
| 55 | +. Use the following configuration rules: |
| 56 | +.. You must set the `featureSet` field when configuring feature gates. |
| 57 | +.. When you use `customNoUpgrade` feature, you must set the `featureSet` to `CustomNoUpgrade`. The `customNoUpgrade` field is only valid when `featureSet: CustomNoUpgrade`. |
| 58 | + |
| 59 | +. Configure any settings required for the feature set you want to work with. |
| 60 | + |
| 61 | +. Restart {microshift-short} to apply the configuration changes by running the following command: |
| 62 | ++ |
| 63 | +[source,terminal] |
| 64 | +---- |
| 65 | +$ sudo systemctl restart microshift |
| 66 | +---- |
0 commit comments