-
Notifications
You must be signed in to change notification settings - Fork 996
/
Copy pathdeployment.yaml
80 lines (80 loc) · 2.42 KB
/
deployment.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
75
76
77
78
79
80
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ template "appmesh-gateway.fullname" . }}
namespace: {{ .Release.Namespace }}
labels:
{{ include "appmesh-gateway.labels" . | indent 4 }}
spec:
strategy:
type: RollingUpdate
rollingUpdate:
maxUnavailable: 10%
selector:
matchLabels:
app.kubernetes.io/name: {{ template "appmesh-gateway.fullname" . }}
template:
metadata:
labels:
app.kubernetes.io/name: {{ template "appmesh-gateway.fullname" . }}
app.kubernetes.io/component: "appmesh-gateway"
annotations:
{{- if .Values.appmesh.preview }}
appmesh.k8s.aws/preview: "enabled"
{{- end }}
{{- if .Values.image.skipImageOverride }}
appmesh.k8s.aws/virtualGatewaySkipImageOverride: "enabled"
{{- end }}
{{- range $key, $value := .Values.podAnnotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
spec:
serviceAccountName: {{ template "appmesh-gateway.serviceAccountName" . }}
terminationGracePeriodSeconds: 30
{{- if .Values.podAntiAffinity }}
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- podAffinityTerm:
labelSelector:
matchLabels:
app.kubernetes.io/name: {{ include "appmesh-gateway.name" . }}
topologyKey: kubernetes.io/hostname
weight: 100
{{- end }}
containers:
- name: envoy
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- containerPort: 8088
name: http
protocol: TCP
- containerPort: 9901
name: http-admin
protocol: TCP
livenessProbe:
exec:
command:
- sh
- -c
- >-
curl -s http://localhost:9901/server_info | grep state | grep -q LIVE
readinessProbe:
initialDelaySeconds: 5
tcpSocket:
port: http-admin
resources:
{{ toYaml .Values.resources | indent 10 }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{ toYaml . | indent 6 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{ toYaml . | indent 6 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{ toYaml . | indent 6 }}
{{- end }}