Skip to content

Commit

Permalink
fix: downscale certain self-managed components when they are disabled (
Browse files Browse the repository at this point in the history
  • Loading branch information
laimonasr authored Nov 12, 2024
1 parent 9cd0865 commit 75e691d
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,15 @@ resource "helm_release" "castai_evictor_self_managed" {
value = "false"
}

dynamic "set" {
for_each = try(var.autoscaler_settings.node_downscaler.evictor.enabled, null) == false ? [0] : []

content {
name = "replicaCount"
value = set.value
}
}

dynamic "set" {
for_each = var.castai_components_labels
content {
Expand Down Expand Up @@ -573,6 +582,15 @@ resource "helm_release" "castai_pod_pinner_self_managed" {
value = "false"
}

dynamic "set" {
for_each = try(var.autoscaler_settings.unschedulable_pods.pod_pinner.enabled, null) == false ? [0] : []

content {
name = "replicaCount"
value = set.value
}
}

dynamic "set" {
for_each = var.api_url != "" ? [var.api_url] : []
content {
Expand Down

0 comments on commit 75e691d

Please sign in to comment.