Skip to content

Commit

Permalink
change owner via init container
Browse files Browse the repository at this point in the history
  • Loading branch information
friedrichwilken committed Feb 15, 2024
1 parent 3427d81 commit 7e14c63
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions resources/nats/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,26 @@ spec:
# reload to the server without restarting the pod.
shareProcessNamespace: true

initContainers:
- name: fix-permissions-config-volume
image: busybox
command: ["sh", "-c", "chown -R 1000:10001 /etc/nats-config"]
volumeMounts:
- name: config-volume
mountPath: /etc/nats-config
- name: fix-permissions-pid
image: busybox
command: ["sh", "-c", "chown -R 1000:10001 /var/run/nats"]
volumeMounts:
- name: pid
mountPath: /var/run/nats
- name: fix-permissions-accounts-volume
image: busybox
command: ["sh", "-c", "chown -R 1000:10001 /etc/nats-config/accounts"]
volumeMounts:
- name: accounts-volume
mountPath: /etc/nats-config/accounts

#################
# #
# NATS Server #
Expand Down

0 comments on commit 7e14c63

Please sign in to comment.