Add sticky disk to service template

This commit is contained in:
IamTheFij 2022-07-25 10:44:37 -07:00
parent 1e35958044
commit 816d6b7097

View File

@ -3,6 +3,7 @@
# image = string*
# service_port = int
# ingress = bool
# sticky_disk = bool
# args = json(list[str])
# resources = dict(cpu = int, mem = int)
# templates = json(list(dict(
@ -36,6 +37,13 @@ job "[[.name]]" {
[[ end ]]
}
[[ if default false .sticky_disk ]]
ephemeral_disk {
migrate = true
sticky = true
}
[[ end ]]
[[ if not (empty .service_port) ]]
service {
name = "[[.name | replace "_" "-"]]"