Skip to content

docs: document SELinux labels for CSI volumes - #730

Open
Demivan wants to merge 1 commit into
siderolabs:mainfrom
Demivan:docs/selinux-csi-volumes
Open

docs: document SELinux labels for CSI volumes#730
Demivan wants to merge 1 commit into
siderolabs:mainfrom
Demivan:docs/selinux-csi-volumes

Conversation

@Demivan

@Demivan Demivan commented Sep 2, 2026

Copy link
Copy Markdown

What

Documents how to give CSI-provisioned volumes an SELinux label, as a new ### CSI volumes
subsection 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 mountOptions instead, which reaches the driver as a
mount 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.mdx in v1.12, v1.13 and v1.14, per the current,
previous and upcoming versioning policy. Identical text in all three.

Also marks the SecurityState example on the same page as shellsession.
style-check-changed reads the whole of any changed file and rejects a $ prompt in a shell
block, and that block contains command output, so it keeps the prompt.

No nav or docs.json change: the page is already listed.

Testing

Ran the four docs-ci checks locally against origin/main and all four pass, with 0 errors and
0 warnings on the three changed files and docs.json regenerating unchanged. The two external
links were checked by hand, since make broken-links only resolves internal ones. Drafted with
Claude 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.

@github-project-automation github-project-automation Bot moved this to To Do in Planning Sep 2, 2026
@talos-bot talos-bot moved this from To Do to In Review in Planning Sep 2, 2026
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
Demivan force-pushed the docs/selinux-csi-volumes branch from 62b3dbe to eba25e8 Compare September 2, 2026 11:24
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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

v1.12 doesn't fully support it

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should I remove this from 1.12 docs?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we will not backport that far, 1.12 is going out of support

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should work properly in 1.13.10+

@github-project-automation github-project-automation Bot moved this from In Review to Approved in Planning Sep 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Approved

Development

Successfully merging this pull request may close these issues.

3 participants