Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions infrastructure/commons/istio/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,21 @@ resource "helm_release" "istiod" {
reuse_values = false
dependency_update = true
max_history = 10

# Enforce HA on istiod. The chart's HPA is enabled by default with
# autoscaleMin=1, so setting only replicaCount is not enough — the HPA
# would scale it back to 1 and re-block any node drain (istiod PDB has
# minAvailable=1). Setting autoscaleMin locks in the floor.
set = [
{
name = "pilot.replicaCount"
value = var.istiod_replicas
},
{
name = "pilot.autoscaleMin"
value = var.istiod_replicas
},
]
}

# Setup Istio Gateway using Helm
Expand Down
11 changes: 11 additions & 0 deletions infrastructure/commons/istio/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,17 @@ variable "istiod_version" {
default = "1.27.1"
}

variable "istiod_replicas" {
description = "Number of istiod replicas. Default is 1 to preserve the previous behavior of this module for existing consumers; set to 2 (recommended) to let the pilot deployment tolerate node drains — the istiod chart installs a PodDisruptionBudget with minAvailable=1, and a single-replica istiod therefore blocks node rolling updates (e.g. EKS AMI bumps). This value is applied to both pilot.replicaCount and pilot.autoscaleMin; without the autoscaleMin override, the HPA (enabled by default with autoscaleMin=1) would scale back to 1 replica shortly after install."
type = number
default = 1

validation {
condition = var.istiod_replicas >= 1
error_message = "istiod_replicas must be at least 1."
}
}

###############################################################################
# SERVICE CONFIGURATION
###############################################################################
Expand Down
Loading