From 6b856385abca8f1f58a47852a3a1e605885f5fd2 Mon Sep 17 00:00:00 2001 From: Lev Kokotov Date: Wed, 13 May 2026 09:56:36 -0700 Subject: [PATCH 1/2] fix: gracefulShutdown should be a factor of shutdownTimeout --- examples/full-example.yaml | 5 +++-- templates/deployment.yaml | 2 ++ values.yaml | 4 +++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/examples/full-example.yaml b/examples/full-example.yaml index e5320c4..4857c9e 100644 --- a/examples/full-example.yaml +++ b/examples/full-example.yaml @@ -87,8 +87,9 @@ podDisruptionBudget: enabled: true minAvailable: 2 # Keep at least 2 pods running -# Configure graceful shutdown window. Should be larger than the sum of shutdownTimeout and preStopSleepSeconds -terminationGracePeriodSeconds: 90 +# terminationGracePeriodSeconds is automatically set to shutdownTimeout + 5 seconds. +# Uncomment to override: +# terminationGracePeriodSeconds: 90 # Enable preStop sleep preStopSleepSeconds: 25 diff --git a/templates/deployment.yaml b/templates/deployment.yaml index 200189e..d19c982 100644 --- a/templates/deployment.yaml +++ b/templates/deployment.yaml @@ -49,6 +49,8 @@ spec: {{- end }} {{- if .Values.terminationGracePeriodSeconds }} terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }} + {{- else }} + terminationGracePeriodSeconds: {{ add (div (default 60000 .Values.shutdownTimeout | int64) 1000) 5 }} {{- end }} {{- with .Values.extraInitContainers }} initContainers: diff --git a/values.yaml b/values.yaml index ecc03b1..737b674 100644 --- a/values.yaml +++ b/values.yaml @@ -66,7 +66,9 @@ replicas: 2 # Not set by default; omitted from the pod spec unless explicitly specified. # Example: priorityClassName: production-critical -# Uncomment to enable explicit grace period +# terminationGracePeriodSeconds is automatically set to shutdownTimeout + 5 seconds. +# Default is 65 seconds (60s shutdownTimeout + 5s buffer). +# Uncomment to override with an explicit value: # terminationGracePeriodSeconds: 90 # Optional: Delay stopping the container to allow the Kubernetes service to update its endpoints and From 0fba7a4857f2582824e839c5e1d2e7e40e6eace3 Mon Sep 17 00:00:00 2001 From: Lev Kokotov Date: Wed, 13 May 2026 09:57:01 -0700 Subject: [PATCH 2/2] version --- Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Chart.yaml b/Chart.yaml index 9335236..921729f 100644 --- a/Chart.yaml +++ b/Chart.yaml @@ -1,4 +1,4 @@ apiVersion: v1 name: pgdog -version: v0.57 +version: v0.58 appVersion: "0.1.40"