Update Kong ingress controller to version 1.4. It fixes the occasional 404 error.
[ric-plt/ric-dep.git] / helm / infrastructure / subcharts / kong / templates / service-kong-proxy.yaml
1 apiVersion: v1
2 kind: Service
3 metadata:
4   name: {{ template "kong.fullname" . }}-proxy
5   annotations:
6     {{- range $key, $value := .Values.proxy.annotations }}
7       {{ $key }}: {{ $value | quote }}
8     {{- end }}
9   labels:
10     {{- include "kong.metaLabels" . | nindent 4 }}
11 spec:
12   type: {{ .Values.proxy.type }}
13   {{- if eq .Values.proxy.type "LoadBalancer" }}
14   {{- if .Values.proxy.loadBalancerIP }}
15   loadBalancerIP: {{ .Values.proxy.loadBalancerIP }}
16   {{- end }}
17   {{- if .Values.proxy.loadBalancerSourceRanges }}
18   loadBalancerSourceRanges:
19   {{- range $cidr := .Values.proxy.loadBalancerSourceRanges }}
20   - {{ $cidr }}
21   {{- end }}
22   {{- end }}
23   {{- end }}
24   externalIPs:
25   {{- range $ip := .Values.proxy.externalIPs }}
26   - {{ $ip }}
27   {{- end }}
28   ports:
29   {{- if .Values.proxy.http.enabled }}
30   - name: kong-proxy
31     port: {{ .Values.proxy.http.servicePort }}
32     targetPort: {{ .Values.proxy.http.containerPort }}
33   {{- if (and (eq .Values.proxy.type "NodePort") (not (empty .Values.proxy.http.nodePort))) }}
34     nodePort: {{ .Values.proxy.http.nodePort }}
35   {{- end }}
36     protocol: TCP
37   {{- end }}
38   {{- if or .Values.proxy.tls.enabled }}
39   - name: kong-proxy-tls
40     port: {{ .Values.proxy.tls.servicePort }}
41     targetPort: {{ .Values.proxy.tls.overrideServiceTargetPort | default .Values.proxy.tls.containerPort }}
42   {{- if (and (eq .Values.proxy.type "NodePort") (not (empty .Values.proxy.tls.nodePort))) }}
43     nodePort: {{ .Values.proxy.tls.nodePort }}
44   {{- end }}
45     protocol: TCP
46   {{- end }}
47   {{- if .Values.proxy.externalTrafficPolicy }}
48   externalTrafficPolicy: {{ .Values.proxy.externalTrafficPolicy }}
49   {{- end }}
50   {{- if .Values.proxy.clusterIP }}
51   clusterIP: {{ .Values.proxy.clusterIP }}
52   {{- end }}
53   selector:
54     {{- include "kong.selectorLabels" . | nindent 4 }}