mirror of
https://github.com/kemko/nomad.git
synced 2026-01-03 00:45:43 +03:00
Cannot set a user for raw_exec tasks, because doing so does not work with the 0700 root owned client data directory that we setup in the e2e cluster in accordance with the Nomad hardening guide.
39 lines
556 B
HCL
39 lines
556 B
HCL
# Copyright (c) HashiCorp, Inc.
|
|
# SPDX-License-Identifier: MPL-2.0
|
|
|
|
# This "env" job simply invokes 'env' using raw_exec.
|
|
|
|
job "env" {
|
|
type = "batch"
|
|
|
|
constraint {
|
|
attribute = "${attr.kernel.name}"
|
|
value = "linux"
|
|
}
|
|
|
|
group "group" {
|
|
reschedule {
|
|
attempts = 0
|
|
unlimited = false
|
|
}
|
|
|
|
restart {
|
|
attempts = 0
|
|
mode = "fail"
|
|
}
|
|
|
|
task "task" {
|
|
driver = "raw_exec"
|
|
|
|
config {
|
|
command = "env"
|
|
}
|
|
|
|
resources {
|
|
cpu = 10
|
|
memory = 10
|
|
}
|
|
}
|
|
}
|
|
}
|