Support custom update conf in job_start
This commit is contained in:
parent
b6af9b54d3
commit
59ccf31656
|
@ -6,3 +6,18 @@
|
|||
[[- if has .nomad "node_pool" ]]
|
||||
node_pool = [[ .nomad.node_pool | toJSON ]]
|
||||
[[- end ]]
|
||||
|
||||
[[- 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 "int" (index $.nomad.update $key)) ]]
|
||||
[[ $key ]] = [[ index $.nomad.update $key ]]
|
||||
[[- else ]]
|
||||
[[ $key ]] = [[ index $.nomad.update $key | toJSON ]]
|
||||
[[- end ]]
|
||||
[[- end ]]
|
||||
[[- end ]]
|
||||
}
|
||||
[[- end ]]
|
||||
|
|
Loading…
Reference in New Issue
Block a user