@@ -630,6 +630,8 @@ use container runtime versions that have the needed changes.
630
630
631
631
- Gather and address feedback from the community
632
632
- Be able to configure UID/GID ranges to use for pods
633
+ - Add unit tests that exercise the feature gate switch (see section "Are there
634
+ any tests for feature enablement/disablement?")
633
635
- This feature is not supported on Windows.
634
636
- Get review from VM container runtimes maintainers (not blocker, as VM runtimes should just ignore
635
637
the field, but nice to have)
@@ -670,6 +672,26 @@ enhancement:
670
672
CRI or CNI may require updating that component before the kubelet.
671
673
-->
672
674
675
+ #### Kubelet and Kube-apiserver skew
676
+
677
+ The apiserver and kubelet feature gate enablement work fine in any combination:
678
+
679
+ 1 . If the apiserver has the feature gate enabled and the kubelet doesn't, then the pod will show that
680
+ field and the kubelet will ignore it. Ultimately, the pod is created without user namespaces.
681
+ 2 . If the apiserver has the feature gate disabled and the kubelet has the flag enabled, then the pod
682
+ won't show this field and therefore the kubelet won't act on a field that isn't shown. The pod is
683
+ created with the feature gate disabled.
684
+
685
+ The kubelet can still create pods with user namespaces if static-pods are configured with
686
+ pod.spec.hostUsers and has the feature gate enabled.
687
+
688
+ If the kube-apiserver doesn't support the feature at all (< 1.25), a pod with userns will be
689
+ rejected.
690
+
691
+ If the kubelet doesn't support the feature (< 1.25), it will ignore the pod.spec.hostUsers field.
692
+
693
+ #### Kubelet and container runtime skews
694
+
673
695
Some definitions first:
674
696
- New kubelet: kubelet with CRI proto files that includes the changes proposed in
675
697
this KEP.
@@ -794,6 +816,9 @@ We will also unit test that, if pods were created with the new field
794
816
pod.specHostUsers, then if the featuregate is disabled all works as expected (no
795
817
user namespace is used).
796
818
819
+ We will add tests exercising the ` switch ` of feature gate itself (what happens
820
+ if I disable a feature gate after having objects written with the new field)
821
+
797
822
<!--
798
823
The e2e framework does not currently support enabling or disabling feature
799
824
gates. However, unit tests in each component dealing with managing data, created
@@ -815,16 +840,17 @@ This section must be completed when targeting beta to a release.
815
840
816
841
###### How can a rollout or rollback fail? Can it impact already running workloads?
817
842
818
- The rollout is just a feature flag on the kubelet and the kube-apiserver.
843
+ If one APIserver is upgraded while other's aren't and you are talking to a not
844
+ upgraded the pod will be accepted (if the apiserver is >= 1.25).
819
845
820
- If one APIserver is upgraded while other's aren't and you are talking to a not upgraded the pod
821
- will be accepted (if the apiserver is >= 1.25). If it is scheduled to a node that the kubelet has
822
- the feature flag activated and the node meets the requirements to use user namespaces, then the
823
- pod will be created with the namespace. If it is scheduled to a node that has the feature disabled,
824
- it will be created without the user namespace.
846
+ If it is scheduled to a node where the kubelet has the feature flag activated and
847
+ the node meets the requirements to use user namespaces, then the pod will be
848
+ created with the namespace. If it is scheduled to a node that has the feature
849
+ disabled, it will be created without the user namespace.
825
850
826
- On a rollback, pods created while the feature was active (created with user namespaces) will have to
827
- be re-created without user namespaces.
851
+ On a rollback, pods created while the feature was active (created with user namespaces) will
852
+ have to be re-created without user namespaces. If those weren't recreated, they will continue
853
+ to run in user namespace.
828
854
829
855
<!--
830
856
Try to be as paranoid as possible - e.g., what if some components will restart
0 commit comments