Skip to content

Commit db0c050

Browse files
committed
Address feedback
1 parent 43d4d84 commit db0c050

File tree

1 file changed

+42
-6
lines changed
  • keps/sig-architecture/4330-compatibility-versions

1 file changed

+42
-6
lines changed

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

Lines changed: 42 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ tags, and then generate with `hack/update-toc.sh`.
9191
- [StorageVersion Compatibility Versioning](#storageversion-compatibility-versioning)
9292
- [API Compatibility Versioning](#api-compatibility-versioning)
9393
- [Discovery](#discovery)
94+
- [Version introspection](#version-introspection)
9495
- [User Stories (Optional)](#user-stories-optional)
9596
- [Story 1](#story-1)
9697
- [Story 2](#story-2)
@@ -268,6 +269,10 @@ Kubernetes components (apiservers, controller managers, schedulers) will offer a
268269
minor versions. If unset, the compatibility version defaults to the `<major.minor>`
269270
version of the binary version.
270271

272+
If the `--compatibility-version` is set to a version outside of the supported version
273+
range (N..N-3), the binary will exit and report an invalid flag value error telling
274+
the user what versions are allowed.
275+
271276
The kubelet is out of scope for this enhancement. Note that the kubelet already
272277
supports N-3 version skew with the kube-apiserver.
273278

@@ -545,6 +550,29 @@ Also note that we that show information about unavailable features in discovery
545550
today. We introduce fields into APIs for disabled-by-default features and make
546551
no attempt to hide those fields in discovery.
547552

553+
### Version introspection
554+
555+
The `/version` endpoint will be augmented to report binary version when this feature
556+
is enabled. Note that this changes default behavior by always including a new field
557+
in `/version` responses. E.g.
558+
559+
```json
560+
{
561+
"major": "1",
562+
"minor": "30",
563+
"binaryMajor": "1",
564+
"binaryMinor": "32",
565+
"compatibility": "29",
566+
"gitVersion": "v1.30.0",
567+
"gitCommit": "<something>",
568+
"gitTreeState": "clean",
569+
"buildDate": "2024-03-30T06:36:32Z",
570+
"goVersion": "go1.21.something",
571+
"compiler": "gc",
572+
"platform": "linux/arm64"
573+
}
574+
```
575+
548576
### User Stories (Optional)
549577

550578
<!--
@@ -622,7 +650,8 @@ While a hard shutdown of a process is likely worse than the disease, exposing so
622650
Possible mitigations:
623651
624652
- Clients send version numbers in request headers. Servers use this to detect
625-
out-of-allowance skew. Servers then surface this to cluster administrators.
653+
out-of-allowance skew. Servers then surface this to cluster administrators
654+
through a metric.
626655
- Components register identity leases (apiserver already does this)
627656
https://github.com/kubernetes/enhancements/pull/4356 proposes doing it for
628657
controller managers. Components include their version information in the
@@ -741,6 +770,8 @@ We intend to have this up and running for Beta
741770
742771
- Initial cross-branch e2e tests completed and enabled
743772
- Compatibility version support for N-3 minor versions
773+
- Clients send version number and servers report out-of-allowance skew to a metric
774+
(Leveraging work from KEP-4355 if possible)
744775
745776
<!--
746777
**Note:** *Not required until targeted at a release.*
@@ -875,17 +906,22 @@ This section must be completed when targeting alpha to a release.
875906

876907
###### Does enabling the feature change any default behavior?
877908

878-
No. Only when the feature gate is enabled AND `--compatibility-version` is set
879-
does behavior change.
909+
Yes, `/version` will respond with `binaryMajor` and `binaryMinor` fields.
910+
This addition of fields should be handled by clients in a backward compatible
911+
way, and is a relatively safe change.
912+
913+
No other default behavior is changed. Only when the feature gate is enabled AND
914+
`--compatibility-version` is set does other behavior change.
880915

881916
###### Can the feature be disabled once it has been enabled (i.e. can we roll back the enablement)?
882917

883-
Yes. Once disabled, the component ignores any `--compatibility-version` value
884-
and operates normally at the current binary version.
918+
Yes. Note that when `--compatibility-version` flags is defined, the feature flag
919+
must be turned on (when feature is in Alpha). So to disable the feature, the
920+
flag must also be removed.
885921

886922
###### What happens if we reenable the feature if it was previously rolled back?
887923

888-
Behavior is as expected, `--compatibility-version` is again applied.
924+
Behavior is as expected, `--compatibility-version` may be set again.
889925

890926
###### Are there any tests for feature enablement/disablement?
891927

0 commit comments

Comments
 (0)