Skip to content

Commit a2b94ea

Browse files
committed
fix permissions on /etc/compute-init
1 parent 614defc commit a2b94ea

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

ansible/test.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,16 +60,16 @@
6060
name: slurm-hostvars-writer
6161
spec:
6262
securityContext:
63-
runAsUser: 1000
64-
runAsGroup: 1000
65-
fsGroup: 1000
63+
runAsUser: 0
64+
runAsGroup: 0
65+
fsGroup: 0
6666
containers:
6767
- name: pause
6868
image: registry.k8s.io/pause
6969
initContainers:
7070
- name: copy-hostvars
7171
image: busybox:1.37
72-
command: ['sh', '-c', 'mkdir -p /etc/compute-init/hostvars && cat /mnt/hostvars/hostvars.yml > /etc/compute-init/hostvars/{{ inventory_hostname }}.yml']
72+
command: ['sh', '-c', 'mkdir -p /etc/compute-init/hostvars && cat /mnt/hostvars/hostvars.yml > /etc/compute-init/hostvars/{{ inventory_hostname }}.yml && chmod 0400 /etc/compute-init/hostvars/{{ inventory_hostname }}.yml']
7373
volumeMounts:
7474
- name: hostvars-dir
7575
mountPath: /etc/

0 commit comments

Comments
 (0)