image: "postgres:9.5"
imagePullPolicy: {{ .Values.image.pullPolicy }}
env:
- - name: POSTGRES_HOST_AUTH_METHOD
- value: "trust"
+ - name: POSTGRES_HOST_AUTH_METHOD
+ value: "trust"
volumeMounts:
- name: postgres-configmap
mountPath: /docker-entrypoint-initdb.d/create_dbs.sh
subPath: create_dbs.sh
+ {{- if .Values.postgres.persistence.enabled }}
+ - name: postgres-storage
+ mountPath: /var/lib/postgresql/data
+ {{- end }}
volumes:
- name: postgres-configmap
configMap:
name: postgres-configmap
+ {{- if .Values.postgres.persistence.enabled }}
+ - name: postgres-storage
+ persistentVolumeClaim:
+ claimName: {{ .Release.Name }}-postgres-pvc
+ {{- end }}