-
Notifications
You must be signed in to change notification settings - Fork 2.2k
/
ingress-gateway.yaml
55 lines (55 loc) · 1.82 KB
/
ingress-gateway.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
{{- if .Values.gateway.enabled -}}
{{- if .Values.gateway.ingress.enabled -}}
{{- $ingressApiIsStable := eq (include "tempo.ingress.isStable" .) "true" -}}
{{- $ingressSupportsIngressClassName := eq (include "tempo.ingress.supportsIngressClassName" .) "true" -}}
{{- $ingressSupportsPathType := eq (include "tempo.ingress.supportsPathType" .) "true" -}}
apiVersion: {{ include "tempo.ingress.apiVersion" . }}
kind: Ingress
metadata:
name: {{ include "tempo.gatewayFullname" . }}
labels:
{{- include "tempo.gatewayLabels" . | nindent 4 }}
{{- with .Values.gateway.ingress.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- if and $ingressSupportsIngressClassName .Values.gateway.ingress.ingressClassName }}
ingressClassName: {{ .Values.gateway.ingress.ingressClassName }}
{{- end -}}
{{- if .Values.gateway.ingress.tls }}
tls:
{{- range .Values.gateway.ingress.tls }}
- hosts:
{{- range .hosts }}
- {{ . | quote }}
{{- end }}
{{- with .secretName }}
secretName: {{ . }}
{{- end }}
{{- end }}
{{- end }}
rules:
{{- range .Values.gateway.ingress.hosts }}
- host: {{ .host | quote }}
http:
paths:
{{- range .paths }}
- path: {{ .path }}
{{- if $ingressSupportsPathType }}
pathType: {{ .pathType }}
{{- end }}
backend:
{{- if $ingressApiIsStable }}
service:
name: {{ include "tempo.gatewayFullname" $ }}
port:
number: {{ $.Values.gateway.service.port }}
{{- else }}
serviceName: {{ include "tempo.gatewayFullname" $ }}
servicePort: {{ $.Values.gateway.service.port }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}