docs: document SELinux labels for CSI volumes - #730
Open
Demivan wants to merge 1 commit into
Open
Conversation
CSI drivers mount the volumes they provision, so Talos cannot label them. Document setting the label through StorageClass mountOptions, and which drivers this works with. Also mark the SecurityState example on the same page as shellsession. The style checker rejects a `$` prompt in a shell block, and that block contains command output, so it keeps the prompt. Link: siderolabs/talos#14182 Signed-off-by: Ivan Demchuk <ivan.demchuk@gmail.com>
Demivan
force-pushed
the
docs/selinux-csi-volumes
branch
from
September 2, 2026 11:24
62b3dbe to
eba25e8
Compare
smira
reviewed
Sep 2, 2026
| SELinux can be put in enforcing mode (to actually prevent access when it is not authorized by the policy) by adding `enforcing=1` to the kernel cmdline. | ||
| This is most commonly done via the configuration in the Image Factory. | ||
|
|
||
| ### CSI volumes |
Author
There was a problem hiding this comment.
Should I remove this from 1.12 docs?
Member
There was a problem hiding this comment.
we will not backport that far, 1.12 is going out of support
smira
reviewed
Sep 2, 2026
| SELinux can be put in enforcing mode (to actually prevent access when it is not authorized by the policy) by adding `enforcing=1` to the kernel cmdline. | ||
| This is most commonly done via the configuration in the Image Factory. | ||
|
|
||
| ### CSI volumes |
Member
There was a problem hiding this comment.
this should work properly in 1.13.10+
smira
approved these changes
Sep 2, 2026
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.
What
Documents how to give CSI-provisioned volumes an SELinux label, as a new
### CSI volumessubsection on the Talos SELinux page.
Why
Talos does not mount CSI volumes, so it cannot label them and pods cannot access their contents.
The label can be set through StorageClass
mountOptionsinstead, which reaches the driver as amount option. That was not documented anywhere.
Requested by @dsseng in
siderolabs/talos#14182 (comment) (the mount permission
this relies on landed in siderolabs/talos#14207).
NFS and SMB are deliberately not covered here, since siderolabs/talos#13987 is still in flight for
those.
Change
Adds the subsection to
security/selinux.mdxin v1.12, v1.13 and v1.14, per the current,previous and upcoming versioning policy. Identical text in all three.
Also marks the
SecurityStateexample on the same page asshellsession.style-check-changedreads the whole of any changed file and rejects a$prompt in ashellblock, and that block contains command output, so it keeps the prompt.
No nav or
docs.jsonchange: the page is already listed.Testing
Ran the four
docs-cichecks locally againstorigin/mainand all four pass, with 0 errors and0 warnings on the three changed files and
docs.jsonregenerating unchanged. The two externallinks were checked by hand, since
make broken-linksonly resolves internal ones. Drafted withClaude Code. The claim about which drivers pass mount options through comes from my own clusters
(OpenEBS LocalPV-LVM on ext4, OpenEBS Mayastor on xfs) rather than from upstream documentation.