@@ -91,6 +91,7 @@ tags, and then generate with `hack/update-toc.sh`.
91
91
- [ StorageVersion Compatibility Versioning] ( #storageversion-compatibility-versioning )
92
92
- [ API Compatibility Versioning] ( #api-compatibility-versioning )
93
93
- [ Discovery] ( #discovery )
94
+ - [ Version introspection] ( #version-introspection )
94
95
- [ User Stories (Optional)] ( #user-stories-optional )
95
96
- [ Story 1] ( #story-1 )
96
97
- [ Story 2] ( #story-2 )
@@ -268,6 +269,10 @@ Kubernetes components (apiservers, controller managers, schedulers) will offer a
268
269
minor versions. If unset, the compatibility version defaults to the ` <major.minor> `
269
270
version of the binary version.
270
271
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
+
271
276
The kubelet is out of scope for this enhancement. Note that the kubelet already
272
277
supports N-3 version skew with the kube-apiserver.
273
278
@@ -545,6 +550,29 @@ Also note that we that show information about unavailable features in discovery
545
550
today. We introduce fields into APIs for disabled-by-default features and make
546
551
no attempt to hide those fields in discovery.
547
552
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
+
548
576
### User Stories (Optional)
549
577
550
578
<!--
@@ -622,7 +650,8 @@ While a hard shutdown of a process is likely worse than the disease, exposing so
622
650
Possible mitigations:
623
651
624
652
- 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.
626
655
- Components register identity leases (apiserver already does this)
627
656
https://github.com/kubernetes/enhancements/pull/4356 proposes doing it for
628
657
controller managers. Components include their version information in the
@@ -741,6 +770,8 @@ We intend to have this up and running for Beta
741
770
742
771
- Initial cross-branch e2e tests completed and enabled
743
772
- 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)
744
775
745
776
<!--
746
777
**Note:** *Not required until targeted at a release.*
@@ -875,17 +906,22 @@ This section must be completed when targeting alpha to a release.
875
906
876
907
###### Does enabling the feature change any default behavior?
877
908
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.
880
915
881
916
###### Can the feature be disabled once it has been enabled (i.e . can we roll back the enablement)?
882
917
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.
885
921
886
922
###### What happens if we reenable the feature if it was previously rolled back?
887
923
888
- Behavior is as expected, ` --compatibility-version` is again applied .
924
+ Behavior is as expected, ` --compatibility-version` may be set again .
889
925
890
926
###### Are there any tests for feature enablement/disablement?
891
927
0 commit comments