1 {{- if .Values.proxy.ingress.enabled -}}
2 {{- $serviceName := include "kong.fullname" . -}}
3 {{- $servicePort := include "kong.ingress.servicePort" .Values.proxy -}}
4 {{- $path := .Values.proxy.ingress.path -}}
5 {{- $hosts_count := len .Values.proxy.ingress.hosts -}}
6 apiVersion: extensions/v1beta1
9 name: {{ template "kong.fullname" . }}-proxy
11 {{- include "kong.metaLabels" . | nindent 4 }}
13 {{- range $key, $value := .Values.proxy.ingress.annotations }}
14 {{ $key }}: {{ $value | quote }}
18 {{- if eq $hosts_count 0 }}
23 serviceName: {{ $serviceName }}-proxy
24 servicePort: {{ $servicePort }}
26 {{- range $host := .Values.proxy.ingress.hosts }}
27 - host: {{ $host | quote }}
32 serviceName: {{ $serviceName }}-proxy
33 servicePort: {{ $servicePort }}
36 {{- if .Values.proxy.ingress.tls }}
38 {{ toYaml .Values.proxy.ingress.tls | indent 4 }}