Skip to content

Commit

Permalink
Set deployment stragegy to recreate for non web deployments
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
saliceti committed Aug 22, 2024
1 parent 780680a commit 66b4ac2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions aks/application/resources.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 66b4ac2

Please sign in to comment.