Skip to content

Commit f56dc41

Browse files
committed
Clarify how long feature gates must be kept in code
1 parent 42ade50 commit f56dc41

File tree

1 file changed

+20
-12
lines changed
  • keps/sig-api-machinery/4330-compatibility-versions

1 file changed

+20
-12
lines changed

keps/sig-api-machinery/4330-compatibility-versions/README.md

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ tags, and then generate with `hack/update-toc.sh`.
8383
- [Goals](#goals)
8484
- [Non-Goals](#non-goals)
8585
- [Proposal](#proposal)
86-
- [Flags](#flags)
86+
- [Component Flags](#component-flags)
8787
- [Feature Compatibility Versioning](#feature-compatibility-versioning)
8888
- [CEL Environment Compatibility Versioning](#cel-environment-compatibility-versioning)
8989
- [StorageVersion Compatibility Versioning](#storageversion-compatibility-versioning)
@@ -215,12 +215,12 @@ Kubernetes control-plane, by means of:
215215

216216
## Proposal
217217

218-
### Flags
218+
### Component Flags
219219

220220
Kubernetes components (apiservers, controller managers, schedulers) will offer a
221221
`--compatibility-version` flag that can be set to any of the previous three
222-
minor versions. If unset, the compatibility version defaults to the minor
223-
version of the binary.
222+
minor versions. If unset, the compatibility version defaults to the `<major.minor>`
223+
version of the binary version.
224224

225225
### Feature Compatibility Versioning
226226

@@ -236,8 +236,17 @@ type FeatureSpec struct {
236236
```
237237

238238
When a component starts, feature gates will be compared against the
239-
compatibility version to determine which features to enable for that
240-
compatibility version.
239+
compatibility version to determine which features to enable to match the set of
240+
features that where enabled for the Kubernetes version the compatibility version
241+
is set to.
242+
243+
Also, `--feature-gates` must behave the same as it did for the Kubernetes
244+
version the compatibility version is set to. I.e. it must be possible to use
245+
`--feature-gates` to disable features that were beta, and enable feature that
246+
were alpha in the Kubernetes version the compatibility version is set to. One
247+
important implication of this requirement is that feature gating must be kept in
248+
the Kubenetes codebase until a feature has reached GA (or been removed) for N-3
249+
releases.
241250

242251
### CEL Environment Compatibility Versioning
243252

@@ -261,15 +270,14 @@ enhancement as the CEL compatibility version.
261270
### StorageVersion Compatibility Versioning
262271

263272
StorageVersions specify what version an apiserver uses to write resources to etcd
264-
for an API group. The StorageVersion differs across releases as API groups
273+
for each API group. The StorageVersion changes across releases as API groups
265274
graduate through stability levels.
266275

267276
The StorageVersions of an API group will need to be modified to track which
268-
storage versions should be used for which Kubernetes versions.
269-
270-
When an apiserver starts, StorageVersions will be compared against the
271-
compatibility version to determine which StorageVersion should be used to write
272-
resources for each API group.
277+
StorageVersions was used for each Kubernetes version that the compatibility
278+
version can be set to. This will then be used when the apiserver to write
279+
resources with the same StorageVersions used by the Kubernetes version the
280+
compatibility version is set to.
273281

274282
### API Compatibility Versioning
275283

0 commit comments

Comments
 (0)