Repository navigation
Conversation
With fsGroupPolicy File, the kubelet gives the Pod's fsGroup read and write access to everything in the volume after each publish. The node service now advertises the VOLUME_MOUNT_GROUP capability, so the kubelet passes the fsGroup instead, and the volume is owned by that group with 0750 for directories and 0640 for files. The CSI spec recommends read-write access for the mount group. Read-only is deliberate: the publish path writes into the volume again on a repeated NodePublishVolume, so the Pod must not be able to change its entries. Products that write into a secret volume break with this change.
lfrancke
changed the base branch from
main
to
fix/write-secret-files-nofollow
November 11, 2026 10:56
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.
Description
With fsGroupPolicy: File, the kubelet gives the Pod's fsGroup read and write access to everything in a secret volume after each publish (files 0660, directories g+rwx with setgid).
Products only need to read their secrets, and secret-operator writes into the volume again on a repeated NodePublishVolume, so the Pod should not be able to change its entries.
The node service now advertises the VOLUME_MOUNT_GROUP capability.
The kubelet then passes the fsGroup in NodePublishVolume instead of changing ownership itself, and secret-operator sets it on every directory (0750) and file (0640) it writes.
Files of existing volumes are corrected the next time they are written, i.e. when the Pod is recreated.
The CSI spec recommends read-write access for the mount group (SHOULD). Read-only is deliberate.
Builds on #775.
Breaking: products that write into a secret volume fail.
I checked all operators, operator-rs and docker-images on main.
One place writes into a secret volume: kafka-operator with OPA TLS imports the OPA CA into /stackable/tls-kafka-internal/truststore.p12 (security.rs), and opa.authorizer.truststore.path points at that file.
That needs to be fixed in kafka-operator before this is merged.
The check was static, so the integration tests of all products should run against this before merging.
Tested on k3d (k3s v1.37.2): the volume is drwxr-x--- / -rw-r----- with the fsGroup as group, the product (uid 1000) can read its secrets, and creating or deleting entries fails with Permission denied.
Not to be merged before the 26.11 release.
Definition of Done Checklist
Author
Reviewer
Acceptance
type/deprecationlabel & add to the deprecation scheduletype/experimentallabel & add to the experimental features tracker