scale pgbouncer to 3 for resilience and run them on separate nodes [ci skip]

This commit is contained in:
Viktor Barzin 2026-01-11 12:42:30 +00:00
parent 16ed21aab2
commit 4e297d609b

View file

@ -35,7 +35,7 @@ resource "kubernetes_deployment" "pgbouncer" {
}
spec {
replicas = 1
replicas = 3
selector {
match_labels = {
@ -51,6 +51,20 @@ resource "kubernetes_deployment" "pgbouncer" {
}
spec {
affinity {
pod_anti_affinity {
required_during_scheduling_ignored_during_execution {
label_selector {
match_expressions {
key = "component"
operator = "In"
values = ["server"]
}
}
topology_key = "kubernetes.io/hostname"
}
}
}
container {
name = "pgbouncer"
image = "edoburu/pgbouncer:latest"