Repository navigation
docs: retain NFS controller privileges in the CSI example - #3521
Open
Luomu (cloudonly) wants to merge 4 commits into
Open
Luomu (cloudonly) wants to merge 4 commits into
Luomu (cloudonly) wants to merge 4 commits into
Conversation
Luomu (cloudonly)
marked this pull request as ready for review
October 31, 2026 04:59
Signed-off-by: cloudonly <enrondg@gmail.com>
Luomu (cloudonly)
force-pushed
the
fix/docs-csi-controller
branch
from
October 31, 2026 05:19
6bcfdab to
bad89ae
Compare
Signed-off-by: cloudonly <enrondg@gmail.com>
SYS_ADMIN alone leaves mounts blocked by default AppArmor profiles. Keep the upstream privileged example and qualify the permission guidance. Signed-off-by: cloudonly <enrondg@gmail.com>
33 tasks
Comment on lines
+188
to
+192
| The controller mounts the NFS share when creating and deleting volume directories. | ||
| This example uses privileged mode for the `nfs` container, following the | ||
| [vendored controller manifest](../../hack/third_party/csi-driver-nfs/deploy/csi-nfs-controller.yaml). | ||
| Adding `SYS_ADMIN` alone does not bypass security profiles that deny mounts. | ||
| Envoy keeps its restricted security context. |
Collaborator
There was a problem hiding this comment.
🤖 Nit: The intent of this example is to demonstrate how to set up the Envoy sidecar rather than the specifics of the NFS driver. Could we reword this paragraph to keep the focus on the Envoy sidecar setup?
Suggested change
| The controller mounts the NFS share when creating and deleting volume directories. | |
| This example uses privileged mode for the `nfs` container, following the | |
| [vendored controller manifest](../../hack/third_party/csi-driver-nfs/deploy/csi-nfs-controller.yaml). | |
| Adding `SYS_ADMIN` alone does not bypass security profiles that deny mounts. | |
| Envoy keeps its restricted security context. | |
| The `envoy-proxy` sidecar shares `socket-dir` (`/csi`) with the CSI driver container and mounts the Envoy configuration (`envoy-config`), the Service DNS serving certificate (`servicedns-certs`), and the Pod Identity trust bundle (`podidentity-ca`). Even when the CSI driver container itself requires elevated privileges (such as [the upstream `csi-nfs-controller` manifest](../../hack/third_party/csi-driver-nfs/deploy/csi-nfs-controller.yaml)), the Envoy sidecar runs with a restricted `securityContext` (`allowPrivilegeEscalation: false`, `readOnlyRootFilesystem: true`, and all capabilities dropped). |
Contributor
Author
There was a problem hiding this comment.
Applied your suggestion in 901068b99 and verified the docs build.
Signed-off-by: cloudonly <enrondg@gmail.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The CSI controller mounts its NFS share when creating and deleting volume directories. The example omits the driver privileges and NODE_ID used by the vendored deployment.
Use privileged mode for the NFS driver, following the vendored controller manifest, and populate NODE_ID from spec.nodeName. Envoy keeps its restricted security context. SYS_ADMIN alone does not override security profiles that deny mounts.
Validation:
The permission comparison did not deploy Kubernetes or the Envoy sidecar. SYS_ADMIN also worked on that test host, but this does not establish compatibility with AppArmor-enabled Kubernetes nodes.
AI use: AI-assisted, I reviewed and tested it.