Hi, I need to mount a configmap as a volume into m...
# rke2
b
Hi, I need to mount a configmap as a volume into my containers and also change user owner top
1000
and file permissions to
0600
. I tried doing this by using
defaultMode
to set the file permissions and
fsGroup
to set the owner:
Copy code
volume:
          name: "my-config-volume"

          config_map:
            name: "my-map"
            defaultMode: 0600
and
Copy code
securityContext:
          fsGroup: 1000
But this is not working because the file permissions is not changed. However,
defaultMode
do work if
fsGroup
is missing. Could this be related? https://github.com/kubernetes/kubernetes/pull/57935 Any idea how could I change the owner of a file and also the file permissions of a
configmap
mounted as a volume? This is my rke2 server version
Copy code
Server Version: version.Info{Major:"1", Minor:"29", GitVersion:"v1.29.0+rke2r1", GitCommit:"3f7a50f38688eb332e2a1b013678c6435d539ae6", GitTreeState:"clean", BuildDate:"2023-12-13T22:06:58Z", GoVersion:"go1.21.5 X:boringcrypto", Compiler:"gc", Platform:"linux/amd64"}