diff --git a/nomad/service.nomad b/nomad/service.nomad index a28ea11..4759217 100644 --- a/nomad/service.nomad +++ b/nomad/service.nomad @@ -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 "_" "-"]]"