Skip to content

Commit d77c979

Browse files
authored
Merge pull request #827 from beraldoleal/feature-gates-vs-configs
docs: FEATURE-GATES -> CONFIG-OPTIONS
2 parents 3625818 + 1776d57 commit d77c979

File tree

2 files changed

+115
-78
lines changed

2 files changed

+115
-78
lines changed

docs/CONFIG-OPTIONS.md

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
# Configuration Options
2+
3+
> [!WARNING]
4+
> **Historical Context**: In the past, we used to call this "Feature Gates". You
5+
> will see some internal structures still using that name, such as
6+
> `osc-feature-gates` ConfigMap and `FeatureGateStatus` struct. However, we are
7+
> updating our terminology and now calling this simply "Configuration Options",
8+
> because that is what this system actually provides.
9+
10+
> **Future Direction**: Ideally, most of the configuration options should be
11+
> migrated to the `KataConfig` Custom Resource. Our goal is to update these
12+
> structures in future releases to provide a more centralized configuration place.
13+
14+
Configuration Options in the Openshift Sandboxed Containers operator allow
15+
administrators to configure various aspects of the operator's behavior. These options
16+
are controlled through the configuration ConfigMap (`osc-feature-gates`),
17+
providing a flexible approach to customizing the operator's functionality.
18+
19+
20+
## Design choices
21+
22+
The configuration options are handled within the KataConfig reconcile loop. If there
23+
are any errors with configuration processing, the reconciliation process
24+
continues and doesn't re-queue. In case of any errors in determining whether a
25+
configuration is enabled or not (for example if the configMap is deleted or some
26+
other API server errors), the processing of the configuration is same as the
27+
default compiled in state of the respective configuration.
28+
29+
The status of individual configurations is stored in the `FeatureGateStatus`
30+
struct that is populated in the beginning of the reconcile loop with the status
31+
of the configurations from the configMap. This ensures that the entire configuration
32+
configMap is only read once from the API server instead of making repeated
33+
calls to the API server for checking individual configurations.
34+
Any errors in reading the configMap from the API server will requeue a reconciliation request,
35+
except for when configMap is not found.
36+
37+
## Feature Maturity Levels
38+
39+
> [!NOTE]
40+
> **Maturity levels apply specifically to features, not all configuration options.**
41+
> While most configuration options are simple settings, features that can be enabled/disabled
42+
> follow maturity level guidelines.
43+
44+
Our features that can be enabled/disabled adhere to simplified lifecycle stages inspired by Kubernetes:
45+
46+
- **DevPreview**:
47+
- Disabled by default.
48+
- May contain bugs; enabling the feature could expose these bugs.
49+
- No long-term support guarantees.
50+
- Not recommended for production use.
51+
52+
- **TechPreview**:
53+
- Usually disabled by default.
54+
- Support for the feature will not be dropped, but details may change.
55+
- Recommended for non-business-critical usage due to potential for changes.
56+
57+
- **GA (General Availability)**:
58+
- May be enabled or disabled by default depending on the specific feature.
59+
- Well-tested and considered safe.
60+
- Stable features will be maintained in future software releases.
61+
- Default state is not determined by maturity level alone.
62+
63+
## Important Note on Default Values
64+
65+
> [!IMPORTANT]
66+
> **Default values are not automatically determined by maturity level.** Even GA features
67+
> may be disabled by default. Users must explicitly check the documentation for each
68+
> feature to understand:
69+
> - The current default state
70+
> - The maturity level
71+
> - What is supported and what is not
72+
> - Whether the feature is DevPreview, TechPreview, or GA
73+
74+
## Disclaimer
75+
76+
> [!WARNING]
77+
> Remember, the availability and default state of each feature may change between
78+
> releases as features progress through their maturity levels. Always refer to
79+
> the latest documentation for up-to-date information on feature support and
80+
> configuration.
81+
82+
## Configuring Options
83+
84+
Configuration options can be set by editing the `osc-feature-gates` ConfigMap
85+
resource. Each configuration allows you to customize specific aspects of the operator's
86+
behavior, from enabling features to setting operational parameters.
87+
88+
### Enabling and disabling features
89+
90+
For feature toggles, a feature is enabled by explicitly setting its value to `"true"` (case sensitive)
91+
and disabled by setting its value to `"false"` (case sensitive)
92+
93+
To enable a feature, you modify the `ConfigMap` object like so:
94+
95+
```yaml
96+
apiVersion: v1
97+
kind: ConfigMap
98+
metadata:
99+
name: osc-feature-gates
100+
namespace: openshift-sandboxed-containers-operator
101+
data:
102+
confidential: "true"
103+
```
104+
105+
In this example, `confidential` is explicitly enabled,
106+
showcasing how to manage the state of each feature individually. Users should
107+
consult the documentation to understand the default state and maturity level
108+
of each feature before enabling it.
109+
110+
### Other configuration options
111+
112+
For non-feature configuration options (such as image specifications, network settings, etc.),
113+
the values and format depend on the specific option. Refer to the individual
114+
documentation for each configuration option to understand the expected format
115+
and valid values.

docs/FEATURE-GATES.md

Lines changed: 0 additions & 78 deletions
This file was deleted.

0 commit comments

Comments
 (0)