github.com/Ilhicas/nomad@v1.0.4-0.20210304152020-e86851182bc3/e2e/scalingpolicies/input/namespace_default_2.nomad (about)

     1  job "horizontally_scalable" {
     2    datacenters = ["dc1"]
     3    type        = "service"
     4  
     5    constraint {
     6      attribute = "${attr.kernel.name}"
     7      value     = "linux"
     8    }
     9  
    10    group "horizontally_scalable" {
    11  
    12      scaling {
    13        min     = 1
    14        max     = 11
    15        enabled = false
    16  
    17        policy {
    18          // Setting a single value allows us to check the policy block is
    19          // handled opaquely by Nomad.
    20          cooldown = "14m"
    21        }
    22      }
    23  
    24      task "test" {
    25        driver = "raw_exec"
    26  
    27        config {
    28          command = "bash"
    29          args    = ["-c", "sleep 15000"]
    30        }
    31      }
    32    }
    33  }