github.com/hernad/nomad@v1.6.112/e2e/rescheduling/input/rescheduling_update.nomad (about)

     1  # Copyright (c) HashiCorp, Inc.
     2  # SPDX-License-Identifier: MPL-2.0
     3  
     4  job "test4" {
     5  
     6    datacenters = ["dc1", "dc2"]
     7  
     8    constraint {
     9      attribute = "${attr.kernel.name}"
    10      value     = "linux"
    11    }
    12  
    13    type = "service"
    14  
    15    group "t4" {
    16      count = 3
    17  
    18      task "t4" {
    19        driver = "raw_exec"
    20  
    21        config {
    22          command = "bash"
    23          args    = ["-c", "sleep 5000"]
    24        }
    25      }
    26  
    27      update {
    28        max_parallel      = 1
    29        min_healthy_time  = "3s"
    30        auto_revert       = false
    31        healthy_deadline  = "5s"
    32        progress_deadline = "10s"
    33      }
    34  
    35      restart {
    36        attempts = 0
    37        delay    = "0s"
    38        mode     = "fail"
    39      }
    40  
    41      reschedule {
    42        attempts  = 3
    43        interval  = "5m"
    44        unlimited = false
    45      }
    46    }
    47  }