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