From b4d27c6546235841432b42bf027c607666e20825 Mon Sep 17 00:00:00 2001 From: kasun Date: Fri, 20 Nov 2026 23:37:37 +0100 Subject: [PATCH] bug(k8s-apps): fail heimdall over within ~30s of node loss Default 300s not-ready/unreachable tolerations kept the pod bound to a dead node for ~5 min. Lower both to 30s, and switch to Recreate so a single-replica RWO pod never waits on a Multi-Attach during rollouts. Verified by stopping worker-2: pod running on worker-3 ~2 min later. The existing Deployment's defaulted rollingUpdate block was removed once with kubectl patch so the API server accepts Recreate. --- 04-k8s-apps/index.ts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/04-k8s-apps/index.ts b/04-k8s-apps/index.ts index 5bd8b8c..1440aac 100644 --- a/04-k8s-apps/index.ts +++ b/04-k8s-apps/index.ts @@ -47,6 +47,7 @@ new k8s.apps.v1.Deployment( }, spec: { replicas: 1, + strategy: { type: "Recreate" }, selector: { matchLabels: labels }, template: { metadata: { labels }, @@ -70,6 +71,20 @@ new k8s.apps.v1.Deployment( }, ], terminationGracePeriodSeconds: 5, + tolerations: [ + { + key: "node.kubernetes.io/unreachable", + operator: "Exists", + effect: "NoExecute", + tolerationSeconds: 30, + }, + { + key: "node.kubernetes.io/not-ready", + operator: "Exists", + effect: "NoExecute", + tolerationSeconds: 30, + }, + ], }, }, }, -- 2.54.1