Skip to content

Commit

Permalink
fix(#145): adds volume mount for postgres
Browse files Browse the repository at this point in the history
  • Loading branch information
witash committed Sep 13, 2024
1 parent 91c6266 commit a128f71
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 9 deletions.
12 changes: 12 additions & 0 deletions deploy/cht_sync/templates/postgres-pvc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{{- if .Values.postgres.enabled }}
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: postgres-pvc
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: {{ .Values.postgres.storageSize | default "1Gi" }}
{{- end }}
18 changes: 9 additions & 9 deletions deploy/cht_sync/templates/postgres.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ spec:
value: {{ .Values.postgres.password }}
- name: POSTGRES_DB
value: {{ .Values.postgres.db }}
- name: PGDATA
value: "/var/lib/postgresql/data/pgdata"
ports:
- containerPort: {{ .Values.postgres.port | default "5432" }}

volumeClaimTemplates:
- metadata:
name: postgres-data
spec:
accessModes: [ "ReadWriteOnce" ]
resources:
requests:
storage: {{ .Values.postgres.storageSize | default "1Gi" }}
volumeMounts:
- name: postgres-data
mountPath: /var/lib/postgresql/data
volumes:
- name: postgres-data
persistentVolumeClaim:
claimName: postgres-pvc
{{- end }}

0 comments on commit a128f71

Please sign in to comment.