github.com/hernad/nomad@v1.6.112/e2e/scalingpolicies/input/namespace_default_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 8 constraint { 9 attribute = "${attr.kernel.name}" 10 value = "linux" 11 } 12 13 group "horizontally_scalable" { 14 15 scaling { 16 min = 1 17 max = 10 18 enabled = true 19 20 policy { 21 // Setting a single value allows us to check the policy block is 22 // handled opaquely by Nomad. 23 cooldown = "13m" 24 } 25 } 26 27 task "test" { 28 driver = "raw_exec" 29 30 config { 31 command = "bash" 32 args = ["-c", "sleep 15000"] 33 } 34 } 35 } 36 }