2023-04-10 15:36:59 +00:00
|
|
|
# Copyright (c) HashiCorp, Inc.
|
|
|
|
# SPDX-License-Identifier: MPL-2.0
|
|
|
|
|
2021-03-26 20:17:49 +00:00
|
|
|
job "oversubscription-docker" {
|
|
|
|
datacenters = ["dc1"]
|
|
|
|
|
|
|
|
constraint {
|
|
|
|
attribute = "${attr.kernel.name}"
|
|
|
|
operator = "set_contains_any"
|
|
|
|
value = "darwin,linux"
|
|
|
|
}
|
|
|
|
|
2022-11-21 18:41:55 +00:00
|
|
|
constraint {
|
|
|
|
attribute = "${attr.unique.cgroup.version}"
|
|
|
|
operator = "="
|
|
|
|
value = "v2"
|
|
|
|
}
|
|
|
|
|
2021-03-26 20:17:49 +00:00
|
|
|
group "group" {
|
|
|
|
task "task" {
|
|
|
|
driver = "docker"
|
|
|
|
|
|
|
|
config {
|
|
|
|
image = "busybox:1.29.2"
|
|
|
|
command = "/bin/sh"
|
2022-11-21 18:41:55 +00:00
|
|
|
args = ["-c", "cat /sys/fs/cgroup/memory.max; sleep 1000"]
|
2021-03-26 20:17:49 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
resources {
|
|
|
|
cpu = 500
|
|
|
|
memory = 20
|
|
|
|
memory_max = 30
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|