Skip to content

Commit 02e2b65

Browse files
committed
Apply feedback, do not support alpha features
1 parent ddae554 commit 02e2b65

File tree

1 file changed

+36
-13
lines changed
  • keps/sig-architecture/4330-compatibility-versions

1 file changed

+36
-13
lines changed

keps/sig-architecture/4330-compatibility-versions/README.md

Lines changed: 36 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ tags, and then generate with `hack/update-toc.sh`.
9595
- [Story 2](#story-2)
9696
- [Notes/Constraints/Caveats (Optional)](#notesconstraintscaveats-optional)
9797
- [Risks and Mitigations](#risks-and-mitigations)
98+
- [Risk: Increased cost in test due to the need to test changes against the e2e tests of multiple release branches](#risk-increased-cost-in-test-due-to-the-need-to-test-changes-against-the-e2e-tests-of-multiple-release-branches)
9899
- [Risk: Increased maintenance burden on Kubernetes maintainers](#risk-increased-maintenance-burden-on-kubernetes-maintainers)
99100
- [Risk: Unintended and out-of-allowance compatibility skew](#risk-unintended-and-out-of-allowance-compatibility-skew)
100101
- [Design Details](#design-details)
@@ -171,6 +172,16 @@ available to cluster administrators. The "compatibility version" is distinct fro
171172
the binary version of a Kubernetes component, and can be used to emulate the
172173
behavior (APIs, features, ...) of a prior Kubernetes release version.
173174

175+
"Compatibility version" is not a bug-for-bug compatibility model. It specifically
176+
controls which APIs, feature gates, configs and flags are enabled to match
177+
that of a previous release version.
178+
179+
The [Version skew policy](https://kubernetes.io/releases/version-skew-policy/)
180+
will apply to compatibility versions, not binary versions, allowing binary
181+
versions to be skipped when performing skip version upgrades, so long the
182+
upgrade transitions incrementally through compatibility versions according
183+
to the supported version skew constraints.
184+
174185
## Motivation
175186

176187
The notion of more granular steps in Kubernetes upgrades is attractive because
@@ -241,6 +252,9 @@ Benefits to upgrading binary version independent of compatibility version:
241252

242253
### Non-Goals
243254

255+
- Support compatibility version for Alpha features. Alpha feature are not
256+
designed to be upgradable, so we will not allow alpha features to be used in
257+
conjunction with compatibility version.
244258
- Changes to Cluster API/kubeadm/KIND/minikube to absorb the compatibility versions
245259
will be addressed separate from this KEP
246260

@@ -316,31 +330,34 @@ The lifecycle of the feature would be:
316330
All feature gating and tracking must remain in code through 1.30 for N-3
317331
compatibility version support.
318332
319-
For a feature that is removed, e.g.:
333+
For a Beta feature that is removed, e.g.:
320334
321335
```go
322336
map[Feature]VersionedSpecs{
323337
featureA: VersionedSpecs{
324-
{Version: mustParseVersion("1.26"), Default: false, PreRelease: Alpha},
338+
{Version: mustParseVersion("1.26"), Default: false, PreRelease: Beta},
325339
{Version: mustParseVersion("1.27"), Default: false, PreRelease: Deprecated},
326340
{Version: mustParseVersion("1.31"), Default: false, PreRelease: Removed},
327341
},
328342
}
329343
```
330344
331-
The lifecycle of the feature implementation would be:
345+
The steps to remove the Beta feature would be:
332346
333347
| Release | Stage | Feature tracking information |
334348
| ------- | ----- | ------------------------------------------------- |
335-
| 1.26 | alpha | Alpha: 1.26 |
336-
| 1.27 | alpha | Alpha: 1.26, Deprecated: 1.27 |
337-
| 1.28 | alpha | Alpha: 1.26, Deprecated: 1.27 |
338-
| 1.29 | alpha | Alpha: 1.26, Deprecated: 1.27 |
339-
| 1.30 | - | Alpha: 1.26, Deprecated: 1.27, Removed: 1.31 |
340-
| 1.31 | - | Alpha: 1.26, Deprecated: 1.27, Removed: 1.31 |
341-
| 1.32 | - | Alpha: 1.26, Deprecated: 1.27, Removed: 1.31 |
349+
| 1.26 | beta | Beta: 1.26 |
350+
| 1.27 | beta | Beta: 1.26, Deprecated: 1.27 |
351+
| 1.28 | beta | Beta: 1.26, Deprecated: 1.27 |
352+
| 1.29 | beta | Beta: 1.26, Deprecated: 1.27 |
353+
| 1.30 | - | Beta: 1.26, Deprecated: 1.27, Removed: 1.31 |
354+
| 1.31 | - | Beta: 1.26, Deprecated: 1.27, Removed: 1.31 |
355+
| 1.32 | - | Beta: 1.26, Deprecated: 1.27, Removed: 1.31 |
342356
| 1.33 | - | **Feature implementation and feature tracking information may be removed from code** |
343357
358+
(Features that are deleted before reaching Beta do not require n-3 compatibility
359+
support since we don't support compatibility version for alpha features)
360+
344361
Note that this respects a 1yr deprecation policy.
345362
346363
All feature gating and tracking must remain in code through 1.32 for N-3
@@ -473,12 +490,14 @@ removed) at.
473490
GA APIs should match the exact set of APIs enabled in GA for the Kubernetes version
474491
the compatibility version is set to.
475492
476-
All Alpha and Beta APIs (both off-by-default and on-by-default, if any of those
493+
All Beta APIs (both off-by-default and on-by-default, if any of those
477494
still exist) need to behave exactly as they did for the Kubernetes version
478495
the compatibility version is set to. I.e. `--runtime-config=api/<version>` needs
479496
to be able to turn on APIs exactly like it did for each Kubernetes version that
480497
compatibility version can be set to.
481498
499+
Alpha APIs may not be enabled in conjunction with compatibility version.
500+
482501
### User Stories (Optional)
483502
484503
<!--
@@ -529,6 +548,10 @@ This might be a good place to talk about core concepts and how they relate.
529548
530549
### Risks and Mitigations
531550
551+
### Risk: Increased cost in test due to the need to test changes against the e2e tests of multiple release branches
552+
553+
TODO: Establish a plan for this for Alpha. Implement for Beta.
554+
532555
#### Risk: Increased maintenance burden on Kubernetes maintainers
533556
534557
Why we think this is manageable:
@@ -623,11 +646,11 @@ For Alpha we will add integration test to ensure `--compatibility-version` behav
623646
624647
**Transition**|**N-1 Behavior**|**N Behavior**|**Expect when compatibility-version=N-1**|**Expect when compatibility-version=N (or is unset)**
625648
-----|-----|-----|-----|-----
626-
Alpha feature introduced|-|off-by-default|feature does not exist, feature gate may not be set|feature enabled only when `--feature-gates=<feature>=true`
649+
Alpha feature introduced|-|off-by-default|feature does not exist, feature gate may not be set|alpha features may not be used in conjunction with compatibility version
627650
Alpha feature graduated to Beta|off-by-default|on-by-default|feature enabled only when `--feature-gates=<feature>=true`|feature enabled unless `--feature-gates=<feature>=false`
628651
Beta feature graduated to GA|on-by-default|on|feature enabled unless `--feature-gates=<feature>=false`|feature always enabled, feature gate may not be set
629652
Beta feature removed|on-by-default|-|feature enabled unless `--feature-gates=<feature>=false`|feature does not exist
630-
Alpha API introduced|-|off-by-default|API does not exist|API available only when `--runtime-config=api/v1alpha1=true`
653+
Alpha API introduced|-|off-by-default|API does not exist|alpha APIs may not be used in conjunction with compatibility version
631654
Beta API graduated to GA|off-by-default|on|API available only when `--runtime-config=api/v1beta1=true`|API `api/v1` available
632655
Beta API removed|off-by-default|-|API available only when `--runtime-config=api/v1beta1=true`|API `api/v1beta1` does not exist
633656
on-by-default Beta API removed|on-by-default|-|API available unless `--runtime-config=api/v1beta1=false`|API `api/v1beta1` does not exist

0 commit comments

Comments
 (0)