Merge "Fix PostgreSQL dataloss on pod restart"

This commit is contained in:
Zuul 2018-02-03 01:41:44 +00:00 committed by Gerrit Code Review
commit 99dd72f665
2 changed files with 7 additions and 1 deletions

View File

@ -56,6 +56,8 @@ spec:
secretKeyRef:
name: {{ .Values.secrets.postgresql.admin }}
key: 'POSTGRES_USER'
- name: 'PGDATA'
value: {{ .Values.storage.mount.path | quote }}
livenessProbe:
exec:
command:
@ -71,7 +73,8 @@ spec:
{{ tuple $envAll $envAll.Values.pod.resources.server | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
volumeMounts:
- name: postgresql-data
mountPath: /var/lib/postgresql
mountPath: {{ .Values.storage.mount.path }}
subPath: {{ .Values.storage.mount.subpath }}
{{- if not .Values.storage.pvc.enabled }}
volumes:
- name: postgresql-data

View File

@ -51,6 +51,9 @@ storage:
class_path: volume.beta.kubernetes.io/storage-class
host:
host_path: /data/openstack-helm/postgresql
mount:
path: /var/lib/postgresql/data
subpath: pgdata
labels:
node_selector_key: openstack-control-plane