-
Notifications
You must be signed in to change notification settings - Fork 521
/
Copy pathistio-gateway.yaml
62 lines (59 loc) · 1.5 KB
/
istio-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
56
57
58
59
{{- if and .Values.istio.enable .Values.istio.gateway.enabled -}}
apiVersion: networking.istio.io/v1beta1
kind: Gateway
metadata:
name: {{ template ".Chart.Name .fullname" $ }}-istio-gateway
labels:
app: {{ template ".Chart.Name .name" $ }}
appId: {{ $.Values.app | quote }}
envId: {{ $.Values.env | quote }}
chart: {{ template ".Chart.Name .chart" $ }}
release: {{ $.Release.Name }}
{{- if $.Values.appLabels }}
{{ toYaml $.Values.appLabels | indent 4 }}
{{- end }}
{{- if $.Values.istio.gateway.labels }}
{{ toYaml $.Values.istio.gateway.labels | indent 4 }}
{{- end }}
{{- if $.Values.istio.gateway.annotations }}
annotations:
{{ toYaml $.Values.istio.gateway.annotations | indent 4 }}
{{- end }}
spec:
selector:
istio: ingressgateway
servers:
- port:
number: 80
name: http
protocol: HTTP
hosts:
{{- if .Values.istio.gateway.host }}
- {{ .Values.istio.gateway.host | quote -}}
{{- else if .Values.istio.gateway.hosts }}
{{- range .Values.istio.gateway.hosts }}
- {{ . | quote }}
{{- end }}
{{- end }}
{{ with .Values.istio.gateway }}
{{- if .tls.enabled }}
tls:
httpsRedirect: true
- port:
number: 443
name: https
protocol: HTTPS
hosts:
{{- if .host }}
- {{ .host | quote }}
{{- else if .hosts }}
{{- range .hosts }}
- {{ . | quote }}
{{- end }}
{{- end }}
tls:
mode: SIMPLE
credentialName: {{ .tls.secretName }}
{{ end }}
{{ end }}
{{ end }}