Skip to content

Commit

Permalink
Ensure deployments spread over availability zones
Browse files Browse the repository at this point in the history
  • Loading branch information
redhug1 committed Jun 24, 2024
1 parent 5fca996 commit c051a1b
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions dp-frontend-dataset-controller.nomad
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,17 @@ job "dp-frontend-dataset-controller" {
group "web" {
count = "{{WEB_TASK_COUNT}}"

spread {
attribute = "${node.unique.id}"
weight = 100
# with `target` omitted, Nomad will spread allocations evenly across all values of the attribute.
}
spread {
attribute = "${attr.platform.aws.placement.availability-zone}"
weight = 100
# with `target` omitted, Nomad will spread allocations evenly across all values of the attribute.
}

constraint {
attribute = "${node.class}"
value = "web"
Expand Down Expand Up @@ -80,6 +91,17 @@ job "dp-frontend-dataset-controller" {
group "publishing" {
count = "{{PUBLISHING_TASK_COUNT}}"

spread {
attribute = "${node.unique.id}"
weight = 100
# with `target` omitted, Nomad will spread allocations evenly across all values of the attribute.
}
spread {
attribute = "${attr.platform.aws.placement.availability-zone}"
weight = 100
# with `target` omitted, Nomad will spread allocations evenly across all values of the attribute.
}

constraint {
attribute = "${node.class}"
value = "publishing"
Expand Down

0 comments on commit c051a1b

Please sign in to comment.