fix(hermes-webui): add initContainer root chown for PVC uid perms
- Removes pod runAsNonRoot/runAsUser to allow init runAsUser: 0 - chowns PVC to 1000:1000 + g+rwX (fixes legacy root-owned files) - webui can now mkdir/write state dir - whoami log non-fatal; runtime non-root
This commit is contained in:
parent
556bedfee0
commit
8f52cb1c25
1 changed files with 15 additions and 2 deletions
|
|
@ -14,10 +14,23 @@ spec:
|
||||||
app: hermes-agent
|
app: hermes-agent
|
||||||
spec:
|
spec:
|
||||||
securityContext:
|
securityContext:
|
||||||
runAsNonRoot: true
|
|
||||||
runAsUser: 1000
|
|
||||||
runAsGroup: 1000
|
runAsGroup: 1000
|
||||||
fsGroup: 1000
|
fsGroup: 1000
|
||||||
|
initContainers:
|
||||||
|
- name: fix-webui-perms
|
||||||
|
image: busybox:1.36
|
||||||
|
securityContext:
|
||||||
|
runAsUser: 0
|
||||||
|
command:
|
||||||
|
- sh
|
||||||
|
- -c
|
||||||
|
args:
|
||||||
|
- |
|
||||||
|
chown -R 1000:1000 /data
|
||||||
|
chmod -R g+rwX,o-rwx /data
|
||||||
|
volumeMounts:
|
||||||
|
- name: hermes-data
|
||||||
|
mountPath: /data
|
||||||
containers:
|
containers:
|
||||||
- name: hermes-agent
|
- name: hermes-agent
|
||||||
securityContext:
|
securityContext:
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue