github.com/hernad/nomad@v1.6.112/e2e/scaling/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    update {
     9      health_check = "task_states"
    10    }
    11  
    12    constraint {
    13      attribute = "${attr.kernel.name}"
    14      value     = "linux"
    15    }
    16  
    17    group "horizontally_scalable" {
    18  
    19      scaling {
    20        min     = 2
    21        max     = 3
    22        enabled = true
    23  
    24        policy {}
    25      }
    26  
    27      task "test" {
    28        driver = "raw_exec"
    29  
    30        config {
    31          command = "bash"
    32          args    = ["-c", "sleep 15000"]
    33        }
    34      }
    35    }
    36  }