mirror of
https://github.com/kemko/nomad.git
synced 2026-01-08 19:35:41 +03:00
* e2e: fixup oversubscription test case for jammy jammy uses cgroups v2, need to lookup the max memory limit from the unified heirarchy format * e2e: set constraint to require cgroups v2 on oversub docker test
34 lines
619 B
HCL
34 lines
619 B
HCL
job "oversubscription-docker" {
|
|
datacenters = ["dc1"]
|
|
|
|
constraint {
|
|
attribute = "${attr.kernel.name}"
|
|
operator = "set_contains_any"
|
|
value = "darwin,linux"
|
|
}
|
|
|
|
constraint {
|
|
attribute = "${attr.unique.cgroup.version}"
|
|
operator = "="
|
|
value = "v2"
|
|
}
|
|
|
|
group "group" {
|
|
task "task" {
|
|
driver = "docker"
|
|
|
|
config {
|
|
image = "busybox:1.29.2"
|
|
command = "/bin/sh"
|
|
args = ["-c", "cat /sys/fs/cgroup/memory.max; sleep 1000"]
|
|
}
|
|
|
|
resources {
|
|
cpu = 500
|
|
memory = 20
|
|
memory_max = 30
|
|
}
|
|
}
|
|
}
|
|
}
|