From de07ab534bb592a26630fac52365876dd4abb0fb Mon Sep 17 00:00:00 2001 From: andrea rota Date: Thu, 14 Mar 2024 11:40:41 +0000 Subject: [PATCH] tweak probes to give more time to api and geo deployments to start [MRXN23-608] --- infrastructure/kubernetes/modules/api/main.tf | 20 ++++++++++++++-- .../kubernetes/modules/geoprocessing/main.tf | 24 +++++++++++++++---- 2 files changed, 38 insertions(+), 6 deletions(-) diff --git a/infrastructure/kubernetes/modules/api/main.tf b/infrastructure/kubernetes/modules/api/main.tf index c83e993e7a..4e01dfb602 100644 --- a/infrastructure/kubernetes/modules/api/main.tf +++ b/infrastructure/kubernetes/modules/api/main.tf @@ -310,6 +310,20 @@ resource "kubernetes_deployment" "api_deployment" { } } + startup_probe { + http_get { + path = "/api/ping" + port = 3000 + scheme = "HTTP" + } + + success_threshold = 1 + failure_threshold = 30 + period_seconds = 10 + timeout_seconds = 5 + initial_delay_seconds = 30 + } + liveness_probe { http_get { path = "/api/ping" @@ -318,6 +332,7 @@ resource "kubernetes_deployment" "api_deployment" { } success_threshold = 1 + failure_threshold = 3 timeout_seconds = 5 initial_delay_seconds = 15 period_seconds = 15 @@ -331,9 +346,10 @@ resource "kubernetes_deployment" "api_deployment" { } success_threshold = 1 + failure_threshold = 3 timeout_seconds = 5 - initial_delay_seconds = 30 - period_seconds = 15 + initial_delay_seconds = 10 + period_seconds = 10 } } } diff --git a/infrastructure/kubernetes/modules/geoprocessing/main.tf b/infrastructure/kubernetes/modules/geoprocessing/main.tf index 6404d1d0f0..f75dbff2ac 100644 --- a/infrastructure/kubernetes/modules/geoprocessing/main.tf +++ b/infrastructure/kubernetes/modules/geoprocessing/main.tf @@ -270,6 +270,20 @@ resource "kubernetes_deployment" "geoprocessing_deployment" { } } + startup_probe { + http_get { + path = "/api/ping" + port = 3000 + scheme = "HTTP" + } + + success_threshold = 1 + failure_threshold = 30 + period_seconds = 10 + timeout_seconds = 5 + initial_delay_seconds = 30 + } + liveness_probe { http_get { path = "/api/ping" @@ -278,9 +292,10 @@ resource "kubernetes_deployment" "geoprocessing_deployment" { } success_threshold = 1 + failure_threshold = 3 timeout_seconds = 5 - initial_delay_seconds = 90 - period_seconds = 30 + initial_delay_seconds = 15 + period_seconds = 15 } readiness_probe { @@ -291,9 +306,10 @@ resource "kubernetes_deployment" "geoprocessing_deployment" { } success_threshold = 1 + failure_threshold = 3 timeout_seconds = 5 - initial_delay_seconds = 30 - period_seconds = 15 + initial_delay_seconds = 10 + period_seconds = 10 } } }