diff --git a/content/en/docs/reference/command-line-tools-reference/feature-gates.md b/content/en/docs/reference/command-line-tools-reference/feature-gates.md index 8262abf7dd8..4c088dab026 100644 --- a/content/en/docs/reference/command-line-tools-reference/feature-gates.md +++ b/content/en/docs/reference/command-line-tools-reference/feature-gates.md @@ -1106,6 +1106,9 @@ Each feature gate is designed for enabling/disabling a specific feature: The seccomp profile is specified in the `securityContext` of a Pod and/or a Container. - `SelectorIndex`: Allows label and field based indexes in API server watch cache to accelerate list operations. +- `SELinuxMountReadWriteOncePod`: Allows kubelet to mount volumes for a Pod directly with the + right SELinux label instead of applying the SELinux label recursively on every file on the + volume. - `ServerSideApply`: Enables the [Sever Side Apply (SSA)](/docs/reference/using-api/server-side-apply/) feature on the API Server. - `ServerSideFieldValidation`: Enables server-side field validation. This means the validation diff --git a/content/en/docs/tasks/configure-pod-container/security-context.md b/content/en/docs/tasks/configure-pod-container/security-context.md index 80d942b724e..73ff19912db 100644 --- a/content/en/docs/tasks/configure-pod-container/security-context.md +++ b/content/en/docs/tasks/configure-pod-container/security-context.md @@ -444,6 +444,43 @@ securityContext: To assign SELinux labels, the SELinux security module must be loaded on the host operating system. {{< /note >}} +### Efficient SELinux volume relabeling + +{{< feature-state for_k8s_version="v1.25" state="alpha" >}} + +By default, the contrainer runtime recursively assigns SELinux label to all +files on all Pod volumes. To speed up this process, Kubernetes can change the +SELinux label of a volume instantly by using a mount option +`-o context=