From 0ddf47f794d3794fac9ad9d82c305f300904e5d3 Mon Sep 17 00:00:00 2001 From: paulfantom Date: Fri, 13 Dec 2024 15:32:44 +0100 Subject: [PATCH] homeassistant: increase graceful termination period Signed-off-by: paulfantom --- apps/homeassistant/manifests/homeassistant/statefulSet.yaml | 3 ++- lib/jsonnet/apps/homeassistant.libsonnet | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/homeassistant/manifests/homeassistant/statefulSet.yaml b/apps/homeassistant/manifests/homeassistant/statefulSet.yaml index 92906b5b..9e4a476e 100644 --- a/apps/homeassistant/manifests/homeassistant/statefulSet.yaml +++ b/apps/homeassistant/manifests/homeassistant/statefulSet.yaml @@ -45,7 +45,7 @@ spec: - containerPort: 8123 name: http preStop: - sleep: 120 + sleep: 240 readinessProbe: failureThreshold: 5 httpGet: @@ -108,6 +108,7 @@ spec: priorityClassName: production-high restartPolicy: Always serviceAccountName: homeassistant + terminationGracePeriodSeconds: 300 volumes: - name: backups persistentVolumeClaim: diff --git a/lib/jsonnet/apps/homeassistant.libsonnet b/lib/jsonnet/apps/homeassistant.libsonnet index c9e11aea..e6253e00 100644 --- a/lib/jsonnet/apps/homeassistant.libsonnet +++ b/lib/jsonnet/apps/homeassistant.libsonnet @@ -155,7 +155,7 @@ function(params) { }], preStop: { # Time to wait before job downloading new image completes - sleep: 120, + sleep: 240, }, ports: [{ containerPort: 8123, @@ -222,6 +222,7 @@ function(params) { restartPolicy: 'Always', serviceAccountName: $.serviceAccount.metadata.name, hostNetwork: $._config.hostNetwork, + terminationGracePeriodSeconds: 300, volumes: [ if std.objectHas(params, 'storage') && std.objectHas(params.storage, 'backups') && std.objectHas(params.storage.backups, 'pvcSpec') && std.length(params.storage.backups.pvcSpec) > 0 then {