(postgres) Add override for termination period

- Allow configuration of the termination grace period
  for the Patroni pod with a default of 180s to ensure
  the database has time to gracefully spin down, even
  on slow disk.

Change-Id: I420cbd601bbffa50217b717bd4a636d48d324617
This commit is contained in:
Scott Hussey 2019-08-25 07:21:53 -05:00
parent f0306ce33d
commit 5a7693cd62
2 changed files with 4 additions and 0 deletions

View File

@ -132,6 +132,8 @@ spec:
{{ tuple $envAll "postgresql" "server" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }}
nodeSelector:
{{ .Values.labels.server.node_selector_key }}: {{ .Values.labels.server.node_selector_value }}
terminationGracePeriodSeconds: {{ .Values.pod.lifecycle.termination_grace_period.server.timeout | default "180" }}
initContainers:
{{ tuple $envAll "postgresql" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
- name: set-volume-perms

View File

@ -70,6 +70,8 @@ pod:
termination_grace_period:
prometheus_postgresql_exporter:
timeout: 30
server:
timeout: 180
resources:
enabled: false
server: