From 0241f2fa3f84b3d058c5882f27f1e6a155802531 Mon Sep 17 00:00:00 2001 From: Francesco Latini Date: Wed, 28 Aug 2024 14:31:13 +0200 Subject: [PATCH] Refactoring of the co location var name --- statefulset.tf | 2 +- variables.tf | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/statefulset.tf b/statefulset.tf index 7534d8d..c7ead5c 100755 --- a/statefulset.tf +++ b/statefulset.tf @@ -34,7 +34,7 @@ resource "kubernetes_stateful_set" "axonserver" { termination_grace_period_seconds = 120 dynamic "affinity" { - for_each = var.share_instance == true ? [ ] : [1] + for_each = var.assign_pods_to_different_nodes == true ? [1] : [ ] content { pod_anti_affinity { preferred_during_scheduling_ignored_during_execution { diff --git a/variables.tf b/variables.tf index 662689a..a5f324e 100755 --- a/variables.tf +++ b/variables.tf @@ -106,8 +106,8 @@ variable "devmode_enabled" { default = false } -variable "share_instance" { +variable "assign_pods_to_different_nodes" { description = "Avoid co location of the replicas on the same node" type = bool - default = true + default = false }