diff --git a/command/job_init.go b/command/job_init.go index b03ab73b2..7b1059aad 100644 --- a/command/job_init.go +++ b/command/job_init.go @@ -159,6 +159,35 @@ job "example" { canary = 0 } + # The migrate stanza specifies the group's strategy for migrating off of + # draining nodes. If omitted, a default migration strategy is applied. + # + # For more information on the "migrate" stanza, please see + # the online documentation at: + # + # https://www.nomadproject.io/docs/job-specification/migrate.html + # + migrate { + # Specifies the number of task groups that can be migrated at the same + # time. This number must be less than the total count for the group as + # (count - max_parallel) will be left running during migrations. + max_parallel = 1 + + # Specifies the mechanism in which allocations health is determined. The + # potential values are "checks" or "task_states". + health_check = "checks" + + # Specifies the minimum time the allocation must be in the healthy state + # before it is marked as healthy and unblocks further allocations from being + # migrated. This is specified using a label suffix like "30s" or "15m". + min_healthy_time = "10s" + + # Specifies the deadline in which the allocation must be marked as healthy + # after which the allocation is automatically transitioned to unhealthy. This + # is specified using a label suffix like "2m" or "1h". + healthy_deadline = "5m" + } + # The "group" stanza defines a series of tasks that should be co-located on # the same Nomad client. Any task within a group will be placed on the same # client.