open-nomad/e2e/affinities/input/anti_affinities.nomad

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

37 lines
571 B
Plaintext
Raw Normal View History

2018-12-19 00:39:45 +00:00
job "test1" {
datacenters = ["dc1", "dc2"]
2019-10-11 12:00:05 +00:00
type = "service"
constraint {
attribute = "${attr.kernel.name}"
value = "linux"
}
2018-12-19 00:39:45 +00:00
affinity {
2019-10-11 12:00:05 +00:00
attribute = "${meta.rack}"
operator = "="
value = "r1"
weight = -50
2018-12-19 00:39:45 +00:00
}
2019-10-11 12:00:05 +00:00
2018-12-19 00:39:45 +00:00
group "test1" {
count = 4
2019-10-11 12:00:05 +00:00
2018-12-19 00:39:45 +00:00
affinity {
2019-10-11 12:00:05 +00:00
attribute = "${node.datacenter}"
operator = "="
value = "dc1"
weight = -50
2018-12-19 00:39:45 +00:00
}
2019-10-11 12:00:05 +00:00
2018-12-19 00:39:45 +00:00
task "test" {
driver = "raw_exec"
config {
command = "bash"
args = ["-c", "sleep 15000"]
}
}
}
2019-10-11 12:00:05 +00:00
}