Sprinkle fsGroupChangePolicy on like magic!

Signed-off-by: Martyn Ranyard <m@rtyn.berlin>
This commit is contained in:
Martyn 2025-06-20 09:30:26 +00:00
parent 926a6047d5
commit 92b454a88a
3 changed files with 3 additions and 0 deletions

View file

@ -32,6 +32,7 @@ spec:
{{- if .Values.securityContext.enabled }} {{- if .Values.securityContext.enabled }}
securityContext: securityContext:
fsGroup: {{ .Values.securityContext.fsGroup }} fsGroup: {{ .Values.securityContext.fsGroup }}
fsGroupChangePolicy: "OnRootMismatch" # There's a chmod already, and no other setup is using this volume!
{{- end }} {{- end }}
{{- if and .Values.volumePermissions.enabled .Values.persistence.enabled }} {{- if and .Values.volumePermissions.enabled .Values.persistence.enabled }}
initContainers: initContainers:

View file

@ -21,6 +21,7 @@ fullnameOverride: ""
podSecurityContext: podSecurityContext:
fsGroup: 1000 fsGroup: 1000
fsGroupChangePolicy: "OnRootMismatch"
samba: samba:
global: global:

View file

@ -102,6 +102,7 @@ spec:
schedulerName: default-scheduler schedulerName: default-scheduler
securityContext: securityContext:
fsGroup: 33 fsGroup: 33
fsGroupChangePolicy: OnRootMismatch
terminationGracePeriodSeconds: 30 terminationGracePeriodSeconds: 30
volumes: volumes:
- name: nextcloud-main - name: nextcloud-main