Add group_start template
This commit is contained in:
parent
6eff79ad64
commit
65e9771acc
|
@ -0,0 +1,20 @@
|
|||
[[- if has . "count" ]]
|
||||
count = [[ .count ]]
|
||||
[[- end ]]
|
||||
shutdown_delay = "6s"
|
||||
[[ template "common/constraints" . ]]
|
||||
|
||||
[[- if has .nomad "update" ]]
|
||||
|
||||
update {
|
||||
[[- range $key := coll.Slice "max_parallel" "health_check" "min_healthy_time" "healthy_deadline" "progress_deadline" "auto_revert" "auto_promote" "canary" "stagger" ]]
|
||||
[[- if has $.nomad.update $key ]]
|
||||
[[- if or (test.IsKind "bool" (index $.nomad.update $key)) (test.IsKind "number" (index $.nomad.update $key)) ]]
|
||||
[[ $key ]] = [[ index $.nomad.update $key ]]
|
||||
[[- else ]]
|
||||
[[ $key ]] = [[ index $.nomad.update $key | toJSON ]]
|
||||
[[- end ]]
|
||||
[[- end ]]
|
||||
[[- end ]]
|
||||
}
|
||||
[[- end ]]
|
|
@ -16,7 +16,7 @@
|
|||
update {
|
||||
[[- range $key := coll.Slice "max_parallel" "health_check" "min_healthy_time" "healthy_deadline" "progress_deadline" "auto_revert" "auto_promote" "canary" "stagger" ]]
|
||||
[[- if has $.nomad.update $key ]]
|
||||
[[- if or (test.IsKind "bool" (index $.nomad.update $key)) (test.IsKind "int" (index $.nomad.update $key)) ]]
|
||||
[[- if or (test.IsKind "bool" (index $.nomad.update $key)) (test.IsKind "number" (index $.nomad.update $key)) ]]
|
||||
[[ $key ]] = [[ index $.nomad.update $key ]]
|
||||
[[- else ]]
|
||||
[[ $key ]] = [[ index $.nomad.update $key | toJSON ]]
|
||||
|
|
Loading…
Reference in New Issue