From d1aa23d3b05a89b4f2ecc6cf21b20d9b6c8df9c5 Mon Sep 17 00:00:00 2001 From: Chi Cong Tran Date: Fri, 10 Oct 2025 10:35:17 +0200 Subject: [PATCH] testing persistent volume (PV): pvc and deployment yaml --- tatort-dev/tatort/templates/deployment.yaml | 7 +++++++ tatort-dev/tatort/templates/pvc.yaml | 15 +++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 tatort-dev/tatort/templates/pvc.yaml diff --git a/tatort-dev/tatort/templates/deployment.yaml b/tatort-dev/tatort/templates/deployment.yaml index d9596a2..2dc4291 100644 --- a/tatort-dev/tatort/templates/deployment.yaml +++ b/tatort-dev/tatort/templates/deployment.yaml @@ -42,6 +42,9 @@ spec: ports: - name: http containerPort: {{ .Values.service.port }} + volumeMounts: + - name: shared-data + mountPath: {{ .Values.sharedDataFolder.path }} env: {{- range $key := .Values.env }} {{- if .value }} @@ -64,6 +67,10 @@ spec: {{- toYaml .Values.securityContext | nindent 12 }} resources: {{ toYaml .Values.resources | indent 12 }} + volumes: + - name: shared-data + persistentVolumeClaim: + claimName: shared-data {{- with .Values.nodeSelector }} nodeSelector: {{ toYaml . | indent 8 }} diff --git a/tatort-dev/tatort/templates/pvc.yaml b/tatort-dev/tatort/templates/pvc.yaml new file mode 100644 index 0000000..62556dc --- /dev/null +++ b/tatort-dev/tatort/templates/pvc.yaml @@ -0,0 +1,15 @@ +{{- if .Values.sharedDataFolder.enabled }} +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: shared-data +spec: + accessModes: + - {{ .Values.sharedDataFolder.accessMode }} + {{- if .Values.sharedDataFolder.storageClass }} + storageClassName: {{ .Values.sharedDataFolder.storageClass }} + {{- end }} + resources: + requests: + storage: {{ .Values.sharedDataFolder.resources.requests.storage }} +{{- end }}