Fix volumePermissions for media repository worker

This commit is contained in:
Jack O'Sullivan 2021-06-29 22:27:05 +01:00
parent 76ae6bc6b3
commit afc82bc672
2 changed files with 9 additions and 3 deletions

View file

@ -47,6 +47,7 @@ spec:
- |
chown {{ .Values.volumePermissions.uid }}:{{ .Values.volumePermissions.gid }} -R /synapse/data
image: "{{ .Values.volumePermissions.image.repository }}:{{ .Values.volumePermissions.image.tag }}"
imagePullPolicy: {{ $.Values.volumePermissions.image.pullPolicy }}
resources:
{{- toYaml .Values.volumePermissions.resources | nindent 12 }}
securityContext:

View file

@ -39,10 +39,15 @@ spec:
{{- if and $needsVolumePermissions (eq $name "media-repository") }}
initContainers:
- name: volume-permissions
command: ["chown", "-R", "666:666", "/synapse/data"]
image: "{{ $.Values.volumePermissions.repository }}:{{ $.Values.volumePermissions.tag }}"
imagePullPolicy: {{ $.Values.volumePermissions.pullPolicy }}
command:
- sh
- -c
- |
chown {{ $.Values.volumePermissions.uid }}:{{ $.Values.volumePermissions.gid }} -R /synapse/data
image: "{{ $.Values.volumePermissions.image.repository }}:{{ $.Values.volumePermissions.image.tag }}"
imagePullPolicy: {{ $.Values.volumePermissions.image.pullPolicy }}
securityContext:
runAsNonRoot: false
runAsUser: 0
resources: {{ $.Values.volumePermissions.resources | toYaml | nindent 12 }}
volumeMounts: