From 614d3c72bda64670bf415a3846faf6f145729860 Mon Sep 17 00:00:00 2001 From: Viktor Barzin Date: Sun, 29 Mar 2026 00:17:29 +0200 Subject: [PATCH] add liveness probe to annas-archive-stacks deployment MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Prevents corrupted SQLite DB from looping errors forever — K8s will auto-restart the pod if /api/version stops responding. --- stacks/ebooks/main.tf | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/stacks/ebooks/main.tf b/stacks/ebooks/main.tf index 4fc154c9..1b174e4e 100644 --- a/stacks/ebooks/main.tf +++ b/stacks/ebooks/main.tf @@ -408,6 +408,16 @@ resource "kubernetes_deployment" "annas-archive-stacks" { port { container_port = 7788 } + liveness_probe { + http_get { + path = "/api/version" + port = 7788 + } + initial_delay_seconds = 15 + period_seconds = 30 + timeout_seconds = 5 + failure_threshold = 3 + } volume_mount { name = "config" mount_path = "/opt/stacks/config"