我创建了以非 root 用户运行的映像,但是当我将 configmap 用于卷时,卷附带的文件是 root 用户。我想更改用户,但我不知道如何更改用户。
我从谷歌和stackoverflow搜索,但我一无所获。
volumeMounts:
- name: test
mountPath: /opt/KOBIL/SSMS/home/configutil
volumes:
- name: test
configMap:
name: slaveconfig
Actual:
lrwxrwxrwx. 1 root root 17 May 21 12:53 config.xml -> ..data/config.xml
lrwxrwxrwx. 1 root root 18 May 21 12:53 modules.xml -> ..data/modules.xml
Expected:
lrwxrwxrwx. 1 xxuser xxuser 17 May 21 12:53 config.xml -> ..data/config.xml
lrwxrwxrwx. 1 xxuser xxuser 18 May 21 12:53 modules.xml -> ..data/modules.xml