Conversation
|
This should not be implemented, as Kubernetes already has logic for this Case built-in. See fsGroup in SecurityContext: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ |
|
The problem is that the current 0.0.2 version of driver ignores fsGroup setting. I'm trying to build a newer version from on the PRs and will report on the success |
|
ok, after spending hours and hours trying to figure out what's going on, I've found the fix for the official release. I use cloudstack ISO kubernetes v1.30.3 and had the same error with non-root users. fsGroup is handled by Kubernetes itself, but for some reason, the default behavior seems to be changed in later versions. There is no permissions-related code in CSI drivers itself. The proper fix is to set Or go to the existing csidriver, and change the property. After setting it to File, permissions are automagically fixed for me. No updates, no custom builds are required, works on the 0.0.2 release. P.S. No AI was helpful with this issue. Co-pilot failed to fix it in the code, Claude and ChatGPT guided in a wrong direction that CSI driver handles permissions. Got to do my own research. More information: |
Containers running with custom uid are not able to access the mounted volume due permissions error.
This fix add the permission flags at mount point level