From dde5d763b2022d66a7ef6ae4dd9f83bec753ba29 Mon Sep 17 00:00:00 2001 From: Pavel Selivanov Date: Thu, 26 Jul 2018 19:24:52 +0200 Subject: [PATCH] fix volume issues for helm practice --- practice/helm/fileshare/templates/deployment.yaml | 7 +++++++ practice/helm/fileshare/templates/pvc.yaml | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) 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 }}