From 68ec4ff1a22dd2ab850b07b9f6bbfce1548900e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20de=20Saint=20Martin?= Date: Mon, 8 Oct 2018 22:00:58 +0200 Subject: [PATCH] [stable/postgresql] Add terminationGracePeriodSeconds parameter. (#8165) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 30 seconds by default might not be enough in some cases. Signed-off-by: Cédric de Saint Martin --- stable/postgresql/Chart.yaml | 2 +- stable/postgresql/README.md | 1 + stable/postgresql/templates/deployment.yaml | 3 +++ stable/postgresql/values.yaml | 5 +++++ 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/stable/postgresql/Chart.yaml b/stable/postgresql/Chart.yaml index 92e9b94a25..3c1433454a 100644 --- a/stable/postgresql/Chart.yaml +++ b/stable/postgresql/Chart.yaml @@ -1,5 +1,5 @@ name: postgresql -version: 0.18.2 +version: 0.19.0 appVersion: 9.6.2 description: Object-relational database management system (ORDBMS) with an emphasis on extensibility and on standards-compliance. keywords: diff --git a/stable/postgresql/README.md b/stable/postgresql/README.md index a925eb4fc7..b4a3de9588 100644 --- a/stable/postgresql/README.md +++ b/stable/postgresql/README.md @@ -83,6 +83,7 @@ The following table lists the configurable parameters of the PostgreSQL chart an | `nodeSelector` | Node labels for pod assignment | {} | | `affinity` | Affinity settings for pod assignment | {} | | `tolerations` | Toleration labels for pod assignment | [] | +| `terminationGracePeriodSeconds` | Optional duration in seconds the pod needs to terminate gracefully | `nil` | | `probes.liveness.initialDelay` | Liveness probe initial delay | `60` | | `probes.liveness.timeoutSeconds` | Liveness probe timeout seconds | `5` | | `probes.liveness.failureThreshold` | Liveness probe failure threshold | `6` | diff --git a/stable/postgresql/templates/deployment.yaml b/stable/postgresql/templates/deployment.yaml index 97e39a6aec..8355715ae1 100644 --- a/stable/postgresql/templates/deployment.yaml +++ b/stable/postgresql/templates/deployment.yaml @@ -47,6 +47,9 @@ spec: {{- if .Values.schedulerName }} schedulerName: "{{ .Values.schedulerName }}" {{- end }} + {{- if .Values.terminationGracePeriodSeconds }} + terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }} + {{- end }} containers: - name: {{ template "postgresql.fullname" . }} image: "{{ .Values.image }}:{{ .Values.imageTag }}" diff --git a/stable/postgresql/values.yaml b/stable/postgresql/values.yaml index 1561d9a4af..0caca358b3 100644 --- a/stable/postgresql/values.yaml +++ b/stable/postgresql/values.yaml @@ -43,6 +43,11 @@ usePasswordFile: false ## # schedulerName: +## Optional duration in seconds the pod needs to terminate gracefully. +## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod/#termination-of-pods +## +# terminationGracePeriodSeconds: 30 + ## Specify runtime config parameters as a dict, using camelCase, e.g. ## {"sharedBuffers": "500MB"} ## ref: https://www.postgresql.org/docs/current/static/runtime-config.html