From 1eb2a37043b346fd651ca22154ea7fa5a83540b1 Mon Sep 17 00:00:00 2001 From: red Date: Sun, 6 Jul 2025 19:03:08 -0400 Subject: [PATCH] update preStop hook and terminationGracePeriod --- manifests/postgres/statefulset.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/manifests/postgres/statefulset.yaml b/manifests/postgres/statefulset.yaml index 28b3a33..4031d5b 100644 --- a/manifests/postgres/statefulset.yaml +++ b/manifests/postgres/statefulset.yaml @@ -17,7 +17,7 @@ spec: labels: app: postgres spec: - terminationGracePeriodSeconds: 30 + terminationGracePeriodSeconds: 60 imagePullSecrets: - name: registry-credentials securityContext: @@ -96,6 +96,10 @@ spec: periodSeconds: 5 timeoutSeconds: 3 failureThreshold: 12 + lifecycle: + preStop: + exec: + command: ["pg_ctl stop -w -t 60 -m fast"] volumes: - name: dshm emptyDir: