From cbf676e39894ea4c6ff655f267193592988bcc74 Mon Sep 17 00:00:00 2001 From: Chi Cong Tran Date: Thu, 27 Nov 2025 10:56:11 +0100 Subject: [PATCH] add .yamls for persistent storage for tatort, see tatort-dev --- tatort/tatort/templates/deployment.yaml | 11 +++++++++++ tatort/tatort/templates/pvc.yaml | 26 +++++++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 tatort/tatort/templates/pvc.yaml diff --git a/tatort/tatort/templates/deployment.yaml b/tatort/tatort/templates/deployment.yaml index d9596a2..3d4b585 100644 --- a/tatort/tatort/templates/deployment.yaml +++ b/tatort/tatort/templates/deployment.yaml @@ -62,6 +62,11 @@ spec: {{- end }} securityContext: {{- toYaml .Values.securityContext | nindent 12 }} + {{ if .Values.sharedDataFolder.enabled }} + volumeMounts: + - name: shared-data-volume + mountPath: /daten + {{ end }} resources: {{ toYaml .Values.resources | indent 12 }} {{- with .Values.nodeSelector }} @@ -76,3 +81,9 @@ spec: tolerations: {{ toYaml . | indent 8 }} {{- end }} + {{ if .Values.sharedDataFolder.enabled }} + volumes: + - name: shared-data-volume + persistentVolumeClaim: + claimName: {{ template "tatort.fullname" . }}-shared-data + {{ end }} diff --git a/tatort/tatort/templates/pvc.yaml b/tatort/tatort/templates/pvc.yaml new file mode 100644 index 0000000..8881a8e --- /dev/null +++ b/tatort/tatort/templates/pvc.yaml @@ -0,0 +1,26 @@ +{{- if .Values.sharedDataFolder.enabled }} +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: {{ template "tatort.fullname" . }}-shared-data + labels: + app: {{ template "tatort.name" . }} + chart: {{ template "tatort.chart" . }} + component: tatort + heritage: {{ .Release.Service }} + release: {{ .Release.Name }} +spec: + accessModes: + {{- if .Values.sharedDataFolder.accessMode }} + - {{ .Values.sharedDataFolder.accessMode }} + {{- else }} + - ReadWriteMany + {{- end }} + {{- if .Values.sharedDataFolder.storageClass }} + storageClassName: {{ .Values.sharedDataFolder.storageClass | quote }} + {{- end }} + {{- with .Values.sharedDataFolder.resources }} + resources: + {{- toYaml . | nindent 4 }} + {{- end }} +{{ end }}