github.com/anth0d/nomad@v0.0.0-20221214183521-ae3a0a2cad06/e2e/scalingpolicies/input/namespace_default_1.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     = 10
    15        enabled = true
    16  
    17        policy {
    18          // Setting a single value allows us to check the policy block is
    19          // handled opaquely by Nomad.
    20          cooldown = "13m"
    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  }