github.com/hernad/nomad@v1.6.112/e2e/disconnectedclients/input/lost_max_disconnect.nomad (about)

     1  # Copyright (c) HashiCorp, Inc.
     2  # SPDX-License-Identifier: MPL-2.0
     3  
     4  job "lost_max_disconnect" {
     5  
     6    datacenters = ["dc1", "dc2"]
     7  
     8    group "group" {
     9  
    10      max_client_disconnect = "1h"
    11  
    12      count = 2
    13  
    14      constraint {
    15        attribute = "${attr.kernel.name}"
    16        value     = "linux"
    17      }
    18  
    19      constraint {
    20        operator = "distinct_hosts"
    21        value    = "true"
    22      }
    23  
    24      task "task" {
    25        driver = "docker"
    26  
    27        config {
    28          image   = "busybox:1"
    29          command = "httpd"
    30          args    = ["-v", "-f", "-p", "8001", "-h", "/var/www"]
    31        }
    32  
    33        resources {
    34          cpu    = 128
    35          memory = 128
    36        }
    37      }
    38    }
    39  
    40  }