Refactor ingress nginx variables

This commit is contained in:
Manuel Alejandro de Brito Fontes 2020-12-11 12:27:15 -03:00
parent 6d90b5e10a
commit 9c0a39636d
4 changed files with 15 additions and 4 deletions

View file

@ -1079,12 +1079,12 @@ stream {
{{ end }}
location {{ $path }} {
{{ $ing := (getIngressInformation $location.Ingress $server.Hostname $location.Path) }}
{{ $ing := (getIngressInformation $location.Ingress $server.Hostname $location.IngressPath) }}
set $namespace {{ $ing.Namespace | quote}};
set $ingress_name {{ $ing.Rule | quote }};
set $service_name {{ $ing.Service | quote }};
set $service_port {{ $ing.ServicePort | quote }};
set $location_path {{ $location.Path | escapeLiteralDollar | quote }};
set $location_path {{ $ing.Path | escapeLiteralDollar | quote }};
{{ buildOpentracingForLocation $all.Cfg.EnableOpentracing $location }}