-
Notifications
You must be signed in to change notification settings - Fork 170
/
Copy pathdeployment.yaml
96 lines (96 loc) · 3.03 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
apiVersion: {{ template "deployment.apiVersion" . }}
kind: Deployment
metadata:
name: {{ template "app.name" . }}
labels:
app: {{ template "app.name" . }}
chart: {{ template "app.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
app: {{ template "app.name" . }}
release: {{ .Release.Name }}
template:
metadata:
labels:
app: {{ template "app.name" . }}
release: {{ .Release.Name }}
annotations:
checksum/config: {{ include (print $.Template.BasePath "/configMapConfig.yaml") . | sha256sum }}
checksum/msteams-card-templates: {{ include (print $.Template.BasePath "/configMapTemplate.yaml") . | sha256sum }}
{{- if .Values.podAnnotations }}
{{ toYaml .Values.podAnnotations | indent 8 }}
{{- end }}
spec:
{{- if .Values.imagePullSecrets }}
imagePullSecrets:
{{ toYaml .Values.imagePullSecrets | indent 8 }}
{{- end}}
volumes:
- name: config-volume
configMap:
name: {{ template "app.name" . }}-config
- name: card-template-volume
configMap:
name: {{ template "app.name" . }}-card-template
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
env:
{{- range $key, $value := $.Values.extraEnvs }}
- name: {{ $key }}
value: {{ $value | quote }}
{{- end }}
volumeMounts:
- name: config-volume
mountPath: /etc/config
- name: card-template-volume
mountPath: /etc/template
args:
- -config-file=/etc/config/connectors.yaml
- -template-file=/etc/template/card.tmpl
{{- with .Values.container.additionalArgs }}
{{ toYaml . | indent 12 }}
{{- end}}
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- name: http
containerPort: {{ .Values.container.port }}
protocol: TCP
readinessProbe:
httpGet:
path: /config
port: http
initialDelaySeconds: 1
periodSeconds: 3
livenessProbe:
httpGet:
path: /config
port: http
initialDelaySeconds: 10
periodSeconds: 20
resources:
{{ toYaml .Values.resources | indent 12 }}
{{- with .Values.podSecurityContext }}
securityContext:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}
{{- if .Values.priorityClassName }}
priorityClassName: {{ .Values.priorityClassName }}
{{- end }}