From 66b4ac23df7b8fb002a22af7351caade624f5b11 Mon Sep 17 00:00:00 2001 From: Colin Saliceti Date: Thu, 22 Aug 2024 16:22:31 +0100 Subject: [PATCH] Set deployment stragegy to recreate for non web deployments Background workers may have issues if 2 versions run at the same time. Since they don't receive user traffic, it does not matter if they are stopped while getting replaced. --- aks/application/resources.tf | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/aks/application/resources.tf b/aks/application/resources.tf index e05010f..2b29db9 100644 --- a/aks/application/resources.tf +++ b/aks/application/resources.tf @@ -39,6 +39,10 @@ resource "kubernetes_deployment" "main" { } } + strategy { + type = var.is_web ? "RollingUpdate" : "Recreate" + } + template { metadata { labels = merge({ app = local.app_name }, local.gcp_wif_label)