Support passing whole context to traefik_middlewares
This commit is contained in:
parent
ec581ab748
commit
ef9fa3450f
|
@ -1 +1,13 @@
|
|||
[[- join (coll.Flatten (coll.Slice .base_middlewares .middlewares)) "," -]]
|
||||
[[- /*
|
||||
# vim: syntax=hcl
|
||||
# Note: for compatibility, we take traefik either from .traefik (when passing the whole context to the template)
|
||||
# or from . (when only .traefik is passed as context)
|
||||
*/ -]]
|
||||
[[- $traefik := dict ]]
|
||||
[[- if and (has . "traefik") (isKind "map" .traefik) ]]
|
||||
[[- $traefik = .traefik ]]
|
||||
[[- else ]]
|
||||
[[ $traefik = . ]]
|
||||
[[- end -]]
|
||||
|
||||
[[- join (coll.Flatten (coll.Slice $traefik.base_middlewares $traefik.middlewares)) "," -]]
|
||||
|
|
Loading…
Reference in New Issue
Block a user