scale pgbouncer to 3 for resilience and run them on separate nodes [ci skip]
This commit is contained in:
parent
16ed21aab2
commit
4e297d609b
1 changed files with 15 additions and 1 deletions
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue