github.com/hernad/nomad@v1.6.112/e2e/scalingpolicies/input/namespace_a_1.nomad (about) 1 # Copyright (c) HashiCorp, Inc. 2 # SPDX-License-Identifier: MPL-2.0 3 4 job "horizontally_scalable" { 5 datacenters = ["dc1"] 6 type = "service" 7 namespace = "NamespaceA" 8 9 constraint { 10 attribute = "${attr.kernel.name}" 11 value = "linux" 12 } 13 14 group "horizontally_scalable" { 15 16 scaling { 17 min = 1 18 max = 10 19 enabled = true 20 21 policy { 22 // Setting a single value allows us to check the policy block is 23 // handled opaquely by Nomad. 24 cooldown = "13m" 25 } 26 } 27 28 task "test" { 29 driver = "raw_exec" 30 31 config { 32 command = "bash" 33 args = ["-c", "sleep 15000"] 34 } 35 } 36 } 37 }