Add middleware support to service levant template
This commit is contained in:
parent
5bbb6c494c
commit
779db10abc
@ -7,6 +7,7 @@
|
||||
# args = json(list[str])
|
||||
# resources = dict(cpu = int, mem = int)
|
||||
# env = json(dict(str: any))
|
||||
# ingress_middlewares = json(list(str))
|
||||
# templates = json(list(dict(
|
||||
# data = str,
|
||||
# dest = str,
|
||||
@ -125,6 +126,9 @@ job "[[.name]]" {
|
||||
[[ if not (empty .ingress_rule) -]]
|
||||
"traefik.http.routers.[[.name]].rule=[[.ingress_rule]]",
|
||||
[[ end -]]
|
||||
[[ with .ingress_middlewares -]][[ range $m := . | parseJSON -]]
|
||||
"traefik.http.routers.[[$.name]].middlewares=[[ $m ]]",
|
||||
[[ end -]][[ end -]]
|
||||
[[ end -]]
|
||||
]
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user