diff --git a/practice/helm/fileshare/templates/deployment.yaml b/practice/helm/fileshare/templates/deployment.yaml index f9d221e..5feb4e6 100644 --- a/practice/helm/fileshare/templates/deployment.yaml +++ b/practice/helm/fileshare/templates/deployment.yaml @@ -19,6 +19,13 @@ spec: app: {{ template "fileshare.name" . }} release: {{ .Release.Name }} spec: + initContainers: + - image: busybox + name: mount-permissions-fix + command: ["sh", "-c", "chmod 777 /data"] + volumeMounts: + - name: data + mountPath: /data containers: - name: {{ .Chart.Name }} image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" diff --git a/practice/helm/fileshare/templates/pvc.yaml b/practice/helm/fileshare/templates/pvc.yaml index 632df51..cb71d10 100644 --- a/practice/helm/fileshare/templates/pvc.yaml +++ b/practice/helm/fileshare/templates/pvc.yaml @@ -10,7 +10,7 @@ metadata: heritage: {{ .Release.Service }} spec: accessModes: - - ReadWriteOnce + - ReadWriteMany resources: requests: storage: {{ .Values.persistence.size | quote }}