Add sticky disk to service template
This commit is contained in:
parent
d386a839c4
commit
391ad8dee6
@ -3,6 +3,7 @@
|
|||||||
# image = string*
|
# image = string*
|
||||||
# service_port = int
|
# service_port = int
|
||||||
# ingress = bool
|
# ingress = bool
|
||||||
|
# sticky_disk = bool
|
||||||
# args = json(list[str])
|
# args = json(list[str])
|
||||||
# resources = dict(cpu = int, mem = int)
|
# resources = dict(cpu = int, mem = int)
|
||||||
# templates = json(list(dict(
|
# templates = json(list(dict(
|
||||||
@ -36,6 +37,13 @@ job "[[.name]]" {
|
|||||||
[[ end ]]
|
[[ end ]]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[[ if default false .sticky_disk ]]
|
||||||
|
ephemeral_disk {
|
||||||
|
migrate = true
|
||||||
|
sticky = true
|
||||||
|
}
|
||||||
|
[[ end ]]
|
||||||
|
|
||||||
[[ if not (empty .service_port) ]]
|
[[ if not (empty .service_port) ]]
|
||||||
service {
|
service {
|
||||||
name = "[[.name | replace "_" "-"]]"
|
name = "[[.name | replace "_" "-"]]"
|
||||||
|
Loading…
Reference in New Issue
Block a user