Extend K8S and RIC installation instructions
[it/dep.git] / ric-infra / 30-Kong / helm / kong / charts / 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 apiVersion: networking.k8s.io/v1beta1
6 kind: Ingress
7 metadata:
8   name: {{ template "kong.fullname" . }}-proxy
9   labels:
10     app: {{ template "kong.name" . }}
11     chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
12     release: "{{ .Release.Name }}"
13     heritage: "{{ .Release.Service }}"
14   annotations:
15     {{- range $key, $value := .Values.proxy.ingress.annotations }}
16       {{ $key }}: {{ $value | quote }}
17     {{- end }}
18 spec:
19   rules:
20     {{- range $host := .Values.proxy.ingress.hosts }}
21     - host: {{ $host }}
22       http:
23         paths:
24           - path: {{ $path }}
25             backend:
26               serviceName: {{ $serviceName }}-proxy
27               servicePort: {{ $servicePort }}
28     {{- end -}}
29   {{- if .Values.proxy.ingress.tls }}
30   tls:
31 {{ toYaml .Values.proxy.ingress.tls | indent 4 }}
32   {{- end -}}
33 {{- end -}}