diff --git a/keps/sig-node/127-user-namespaces/README.md b/keps/sig-node/127-user-namespaces/README.md index 72e8bcad5eb5..1cb5a5c5eeb1 100644 --- a/keps/sig-node/127-user-namespaces/README.md +++ b/keps/sig-node/127-user-namespaces/README.md @@ -39,6 +39,8 @@ - [GA](#ga) - [Upgrade / Downgrade Strategy](#upgrade--downgrade-strategy) - [Version Skew Strategy](#version-skew-strategy) + - [Kubelet and Kube-apiserver skew](#kubelet-and-kube-apiserver-skew) + - [Kubelet and container runtime skews](#kubelet-and-container-runtime-skews) - [Production Readiness Review Questionnaire](#production-readiness-review-questionnaire) - [Feature Enablement and Rollback](#feature-enablement-and-rollback) - [Rollout, Upgrade and Rollback Planning](#rollout-upgrade-and-rollback-planning) @@ -612,7 +614,7 @@ use container runtime versions that have the needed changes. ##### critests -- For Alpha, the feature is tested for containerd and CRI-O in cri-tools repo using critest to +- For Beta, the feature is tested for containerd and CRI-O in cri-tools repo using critest to make sure the specified user namespace configuration is honored. - : @@ -630,6 +632,9 @@ use container runtime versions that have the needed changes. - Gather and address feedback from the community - Be able to configure UID/GID ranges to use for pods +- Add unit tests that exercise the feature gate switch (see section "Are there + any tests for feature enablement/disablement?") +- Add cri-tools test - This feature is not supported on Windows. - Get review from VM container runtimes maintainers (not blocker, as VM runtimes should just ignore the field, but nice to have) @@ -670,6 +675,26 @@ enhancement: CRI or CNI may require updating that component before the kubelet. --> +#### Kubelet and Kube-apiserver skew + +The apiserver and kubelet feature gate enablement work fine in any combination: + +1. If the apiserver has the feature gate enabled and the kubelet doesn't, then the pod will show + that field and the kubelet will ignore it. Then, the pod is created without user namespaces. +2. If the apiserver has the feature gate disabled and the kubelet enabled, the pod won't show this + field and therefore the kubelet won't act on a field that isn't shown. The pod is created with + the feature gate disabled. + +The kubelet can still create pods with user namespaces if static-pods are configured with +pod.spec.hostUsers and has the feature gate enabled. + +If the kube-apiserver doesn't support the feature at all (< 1.25), a pod with userns will be +rejected. + +If the kubelet doesn't support the feature (< 1.25), it will ignore the pod.spec.hostUsers field. + +#### Kubelet and container runtime skews + Some definitions first: - New kubelet: kubelet with CRI proto files that includes the changes proposed in this KEP. @@ -794,6 +819,9 @@ We will also unit test that, if pods were created with the new field pod.specHostUsers, then if the featuregate is disabled all works as expected (no user namespace is used). +We will add tests exercising the `switch` of feature gate itself (what happens +if I disable a feature gate after having objects written with the new field) +