Update Kong ingress controller to version 1.4. It fixes the occasional 404 error.
[ric-plt/ric-dep.git] / helm / infrastructure / subcharts / kong / templates / ingress-proxy.yaml
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
7 kind: Ingress
8 metadata:
9   name: {{ template "kong.fullname" . }}-proxy
10   labels:
11     {{- include "kong.metaLabels" . | nindent 4 }}
12   annotations:
13     {{- range $key, $value := .Values.proxy.ingress.annotations }}
14       {{ $key }}: {{ $value | quote }}
15     {{- end }}
16 spec:
17   rules:
18     {{- if eq $hosts_count 0 }}
19     - http:
20         paths:
21           - path: {{ $path }}
22             backend:
23               serviceName: {{ $serviceName }}-proxy
24               servicePort: {{ $servicePort }}
25     {{ else -}}
26     {{- range $host := .Values.proxy.ingress.hosts }}
27     - host: {{ $host | quote }}
28       http:
29         paths:
30           - path: {{ $path }}
31             backend:
32               serviceName: {{ $serviceName }}-proxy
33               servicePort: {{ $servicePort }}
34     {{- end -}}
35     {{- end -}}
36   {{- if .Values.proxy.ingress.tls }}
37   tls:
38 {{ toYaml .Values.proxy.ingress.tls | indent 4 }}
39   {{- end -}}
40 {{- end -}}