You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: Documentation/contributor-guide/features.md
+47-43
Original file line number
Diff line number
Diff line change
@@ -4,80 +4,84 @@ This document provides an overview of etcd features and general development guid
4
4
5
5
## Overview
6
6
7
-
The etcd features fall into three stages, experimental, stable, and unsafe.
7
+
The etcd features fall into three stages: Alpha, Beta, and GA.
8
8
9
-
### Experimental
9
+
### Alpha
10
10
11
-
Any new feature is usually added as an experimental feature. An experimental feature is characterized as below:
11
+
Any new feature is usually added as an Alpha feature. An Alpha feature is characterized as below:
12
12
- Might be buggy due to a lack of user testing. Enabling the feature may not work as expected.
13
-
- Disabled by default when added initially.
13
+
- Disabled by default.
14
14
- Support for such a feature may be dropped at any time without notice
15
15
- Feature-related issues may be given lower priorities.
16
-
- It can be removed in the next minor or major release without following the feature deprecation policy unless it graduates to a stable future.
16
+
- It can be removed in the next minor or major release without following the feature deprecation policy unless it graduates to a more stable stage.
17
17
18
-
### Stable
18
+
### Beta
19
19
20
-
A stable feature is characterized as below:
20
+
A Beta feature is characterized as below:
21
21
- Supported as part of the supported releases of etcd.
22
-
-May be enabled by default.
22
+
-Enabled by default.
23
23
- Discontinuation of support must follow the feature deprecation policy.
24
24
25
-
### Unsafe
25
+
### GA
26
26
27
-
Unsafe features are rare and listed under the `Unsafe feature:` section in the etcd usage documentation. By default, they are disabled. They should be used with caution following documentation. An unsafe feature can be removed in the next minor or major release without following the feature deprecation policy.
27
+
A GA feature is characterized as below:
28
+
- Supported as part of the supported releases of etcd.
29
+
- Always enabled; you cannot disable it. The corresponding feature gate is no longer needed.
30
+
- Discontinuation of support must follow the feature deprecation policy.
28
31
29
32
## Development Guidelines
30
33
31
34
### Adding a new feature
32
35
33
-
Any new enhancements to the etcd are typically added as an experimental feature. The general development requirements are listed below. They can be somewhat flexible depending on the scope of the feature and review discussions and will evolve over time.
34
-
- Open an issue
36
+
Any new enhancements to the etcd are typically added as an Alpha feature.
37
+
38
+
etcd follows the Kubernetes [KEP process](https://github.com/kubernetes/enhancements/blob/master/keps/sig-architecture/0000-kep-process/README.md) for new enhancements. The general development requirements are listed below. They can be somewhat flexible depending on the scope of the feature and review discussions and will evolve over time.
39
+
- Open a [KEP](https://github.com/kubernetes/enhancements/issues) issue
35
40
- It must provide a clear need for the proposed feature.
36
-
- It should list development work items as checkboxes. There must be one work item towards future graduation to a stable future.
37
-
- Label the issue with `type/feature` and `experimental`.
41
+
- It should list development work items as checkboxes. There must be one work item towards future graduation to Beta.
42
+
- Label the issue with `/sig etcd`.
38
43
- Keep the issue open for tracking purposes until a decision is made on graduation.
39
-
- Open a Pull Request (PR)
44
+
- Open a [KEP](https://github.com/kubernetes/enhancements) Pull Request (PR).
45
+
- The KEP template can be simplified for etcd.
46
+
- It must provide clear graduation criteria for each stage.
47
+
- The KEP doc should reside in [keps/sig-etcd](https://github.com/kubernetes/enhancements/tree/master/keps/sig-etcd/)
48
+
- Open Pull Requests (PRs) in [etcd](https://github.com/etcd-io/etcd)
40
49
- Provide unit tests. Integration tests are also recommended as possible.
41
50
- Provide robust e2e test coverage. If the feature being added is complicated or quickly needed, maintainers can decide to go with e2e tests for basic coverage initially and have robust coverage added at a later time before the feature graduation to the stable feature.
42
51
- Provide logs for proper debugging.
43
52
- Provide metrics and benchmarks as needed.
44
-
-The Feature should be disabled by default.
45
-
- Any configuration flags related to the implementation of the feature must be prefixed with `experimental`e.g. `--experimental-feature-name`.
53
+
-Add an Alpha [feature gate](https://etcd.io/docs/v3.6/feature-gates/).
54
+
- Any code changes or configuration flags related to the implementation of the feature must be gated with the feature gate e.g. `if cfg.ServerFeatureGate.Enabled(features.FeatureName)`.
46
55
- Add a CHANGELOG entry.
47
-
- At least two maintainers must approve feature requirements and related code changes.
56
+
- At least two maintainers must approve the KEP and related code changes.
48
57
49
-
### Graduating an Experimental feature to Stable
58
+
### Graduating a feature to the next stage
50
59
51
-
It is important that experimental features don't get stuck in that stage. They should be revisited and moved to the stable stage following the graduation steps as described here.
52
-
53
-
#### Locate graduation candidate
54
-
Decide if an experimental feature is ready for graduation to the stable stage.
55
-
- Find the issue that was used to enable the experimental feature initially. One way to find such issues is to search for issues with `type/feature` and `experimental` labels.
56
-
- Fix any known open issues against the feature.
57
-
- Make sure the feature was enabled for at least one previous release. Check the PR(s) reference from the issue to see when the feature-related code changes were merged.
60
+
It is important that features don't get stuck in one stage. They should be revisited and moved to the next stage once they meet the graduation criteria listed in the KEP. A feature should stay at one stage for at least one release before being promoted.
58
61
59
62
#### Provide implementation
60
-
If an experimental feature is found ready for graduation to the stable stage, open a Pull Request (PR) with the following changes.
61
-
- Add robust e2e tests if not already provided.
62
-
- Add a new stable feature flag identical to the experimental feature flag but without the `--experimental` prefix.
63
-
- Deprecate the experimental feature following the [feature deprecation policy](#Deprecating-a-feature).
64
-
- Implementation must ensure that both the graduated and deprecated experimental feature flags work as expected. Note that both these flags will co-exist for the timeframe described in the feature deprecation policy.
65
-
- Enable the graduated feature by default if needed.
63
+
64
+
If a feature is found ready for graduation to the next stage, open a Pull Request (PR) with the following changes.
65
+
- Update the feature `PreRelease` stage in `server/features/etcd_features.go`.
66
+
- Update the status in the original KEP issue.
66
67
67
68
At least two maintainers must approve the work. Patch releases should not be considered for graduation.
68
69
69
70
### Deprecating a feature
70
71
71
-
#### Experimental
72
-
An experimental feature deprecates when it graduates to the stable stage.
73
-
- Add a deprecation message in the documentation of the experimental feature with a recommendation to use a related stable feature. e.g. `DEPRECATED. Use <feature-name> instead.`
74
-
- Add a `deprecated` label in the issue that was initially used to enable the experimental feature.
72
+
#### Alpha
73
+
Alpha features can be removed without going through the deprecation process.
74
+
- Remove the feature gate in `server/features/etcd_features.go`, and clean up all relevant code.
75
+
- Close the original KEP issue with reasons to drop the feature.
76
+
77
+
#### Beta and GA
78
+
As the project evolves, a Beta/GA feature may sometimes need to be deprecated and removed. Such a situation should be handled using the steps below:
75
79
76
-
#### Stable
77
-
As the project evolves, a stable feature may sometimes need to be deprecated and removed. Such a situation should be handled using the steps below:
78
-
-Create an issue for tracking purposes.
79
-
-Add a deprecation message in the feature usage documentation before a planned release for feature deprecation. e.g. `To be deprecated in <release>.`. If a new feature replaces the `To be deprecated` feature, then also provide a message saying so. e.g. `Use <feature-name> instead.`.
80
-
- Deprecate the feature in the planned release with a message as part of the feature usage documentation. e.g. `DEPRECATED`. If a new feature replaces the deprecated feature, then also provide a message saying so. e.g. `DEPRECATED. Use <feature-name> instead.`.
81
-
-Add a `deprecated` label in the related issue.
80
+
- A Beta/GA feature can only be deprecated after at least 2 minor or major releases.
81
+
- Update original KEP issue if it has not been closed or create a new etcd issue with reasons and steps to deprecate the feature.
82
+
-Add the feature deprecation documentation in the release notes and feature gates documentation of the next minor/major release.
83
+
-In the next minor/major release, set the feature gate to `{Default: false, PreRelease: featuregate.Deprecated, LockedToDefault: false}`in `server/features/etcd_features.go`. Deprecated feature gates must respond with a warning when used.
84
+
- If the feature has GAed, and the original gated codes has been cleaned up, add the disablement codes back with the feature gate.
85
+
-In the minor/major release after the next, set the feature gate to `{Default: false, PreRelease: featuregate.Deprecated, LockedToDefault: true}`in `server/features/etcd_features.go`, and start cleaning the code.
82
86
83
-
Remove the deprecated feature in the following release. Close any related issue(s). At least two maintainers must approve the work. Patch releases should not be considered for deprecation.
87
+
At least two maintainers must approve the work. Patch releases should not be considered for deprecation.
0 commit comments