From 203d2361889fd47450256fad66c23ec6bf1bbb16 Mon Sep 17 00:00:00 2001 From: Martyn Ranyard Date: Mon, 4 Mar 2024 11:41:46 +0000 Subject: [PATCH] Privileged to mount, plus mounts. Signed-off-by: Martyn Ranyard --- apps-helm/samba4/templates/deployment.yaml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/apps-helm/samba4/templates/deployment.yaml b/apps-helm/samba4/templates/deployment.yaml index 2ec4636..4f59d74 100644 --- a/apps-helm/samba4/templates/deployment.yaml +++ b/apps-helm/samba4/templates/deployment.yaml @@ -43,6 +43,8 @@ spec: {{- if .Values.persistence.combineShares }} - name: overlaymagic image: busybox + securityContext: + privileged: true command: - /bin/sh - -c @@ -61,6 +63,16 @@ spec: - /bin/sh - -c - {{ range .Values.persistence.sharesToCombine }}umount /combined/{{ .destName }}; {{- end }} + volumeMounts: + - mountPath: /data + name: data + {{- range .Values.persistence.extraPVCShares }} + - mountPath: /extras/{{ .name }} + name: {{ .name }} + {{- end }} + - mountPath: /combined + mountPropagation: Bidirectional + name: combineRoot {{- end }} - name: {{ .Chart.Name }} image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" @@ -196,3 +208,7 @@ spec: claimName: {{ $fullName }}-{{ .name }} {{- end }} {{ end -}} +{{ if .Values.persistence.combineShares }} + - name: combineRoot + emptyDir: {} +{{ end -}}