This repository has been archived by the owner on Feb 22, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16.7k
/
Copy pathingress.yaml
74 lines (74 loc) · 2.5 KB
/
ingress.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
{{- if and .Values.istio.install (not .Release.IsInstall) -}}
{{- $serviceName := include "istio.name" . -}}
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: {{ $serviceName }}-{{ .Values.ingress.deployment.name }}
labels:
{{ include "istio.labels.standard" . | indent 4 }}
component: {{ $serviceName }}-{{ .Values.ingress.deployment.name }}
istio: {{ $serviceName }}-{{ .Values.ingress.deployment.name }}
spec:
replicas: {{ .Values.ingress.deployment.replicas }}
template:
metadata:
annotations:
{{- range $key, $value := .Values.ingress.annotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
labels:
{{ include "istio.labels.standard" . | indent 8 }}
component: {{ $serviceName }}-{{ .Values.ingress.deployment.name }}
istio: {{ $serviceName }}-{{ .Values.ingress.deployment.name }}
spec:
{{- if .Values.ingress.deployment.nodeSelector }}
nodeSelector:
{{ toYaml .Values.nodeSelector | indent 8 }}
{{- end }}
serviceAccountName: {{ $serviceName }}-{{ .Values.ingress.deployment.name }}-service-account
containers:
- name: istio-ingress
image: "{{ .Values.ingress.deployment.image }}:{{ .Values.istio.release }}"
args:
- proxy
- ingress
- -v
- "2"
- --discoveryAddress
- {{ $serviceName }}-{{ .Values.pilot.name }}:{{ .Values.pilot.service.externalHttpDiscovery }}
imagePullPolicy: {{ .Values.ingress.deployment.imagePullPolicy }}
ports:
- containerPort: {{ .Values.ingress.service.externalHttpPort }}
- containerPort: {{ .Values.ingress.service.externalHttpsPort }}
env:
- name: POD_NAME
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.name
- name: POD_NAMESPACE
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.namespace
resources:
{{ toYaml .Values.ingress.deployment.resources | indent 10 }}
{{ if .Values.auth.enabled }}
volumeMounts:
- name: istio-certs
mountPath: /etc/certs
readOnly: true
- name: ingress-certs
mountPath: /etc/istio/ingress-certs
readOnly: true
volumes:
- name: istio-certs
secret:
secretName: istio.default
optional: true
- name: ingress-certs
secret:
secretName: istio-ingress-certs
optional: true
{{ end }}
{{- end -}}