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 {