From 454e5f5d1a0f480ab38f45c1dff450ec9be70dfc Mon Sep 17 00:00:00 2001 From: Frank Sauerburger <frank@sauerburger.com> Date: Wed, 27 Oct 2021 10:19:10 +0200 Subject: [PATCH] Fix persistent storage --- postgres/Chart.yaml | 2 +- postgres/templates/all.yaml | 24 +++++++++++++++++++++++- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/postgres/Chart.yaml b/postgres/Chart.yaml index cfbe94c..8a4c3d0 100644 --- a/postgres/Chart.yaml +++ b/postgres/Chart.yaml @@ -15,7 +15,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.1.0 +version: 0.2.1 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/postgres/templates/all.yaml b/postgres/templates/all.yaml index e58de3d..e79e153 100644 --- a/postgres/templates/all.yaml +++ b/postgres/templates/all.yaml @@ -34,6 +34,18 @@ spec: requests: storage: {{ .Values.storage.requestSize | quote }} --- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: {{ .Release.Name }}-pgadmin-pvc +spec: + accessModes: + - ReadWriteMany + storageClassName: {{ .Values.storage.persistentStorageClass | quote }} + resources: + requests: + storage: 1Gi +--- apiVersion: apps/v1 kind: Deployment metadata: @@ -88,6 +100,9 @@ spec: port: 5432 initialDelaySeconds: 120 periodSeconds: 30 + volumeMounts: + - mountPath: /var/lib/postgresql/data + name: vol volumes: - name: vol persistentVolumeClaim: @@ -120,7 +135,7 @@ spec: spec: containers: - name: pgadmin - image: docker.sauerburger.com/dpage/pgadmin4:2021-10-06-2 + image: docker.sauerburger.com/dpage/pgadmin4:6.1 ports: - containerPort: 80 env: @@ -151,6 +166,13 @@ spec: port: 80 initialDelaySeconds: 600 periodSeconds: 30 + volumeMounts: + - mountPath: /var/lib/pgadmin + name: vol + volumes: + - name: vol + persistentVolumeClaim: + claimName: {{ .Release.Name }}-pgadmin-pvc --- apiVersion: v1 kind: Service -- GitLab