Skip to content

Commit

Permalink
spread the haxelib server pods across nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
andyli committed Dec 6, 2021
1 parent 6d07b5d commit cca398e
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions terraform/haxelib-server.tf
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,17 @@ resource "kubernetes_deployment" "haxelib-server" {
}

spec {
topology_spread_constraint {
max_skew = 1
topology_key = "kubernetes.io/hostname"
when_unsatisfiable = "ScheduleAnyway"
label_selector {
match_labels = {
"app.kubernetes.io/instance" = "haxelib-server-${each.key}"
}
}
}

container {
image = each.value.image
name = "haxelib-server"
Expand Down

0 comments on commit cca398e

Please sign in to comment.