1+ apiVersion : apps/v1
2+ kind : Deployment
3+ metadata :
4+ name : {{ include "bingo.fullname" . }}
5+ labels :
6+ {{- include "bingo.labels" . | nindent 4 }}
7+ spec :
8+ {{- if not .Values.autoscaling.enabled }}
9+ replicas : {{ .Values.replicaCount }}
10+ {{- end }}
11+ selector :
12+ matchLabels :
13+ {{- include "bingo.selectorLabels" . | nindent 6 }}
14+ template :
15+ metadata :
16+ {{- with .Values.podAnnotations }}
17+ annotations :
18+ {{- toYaml . | nindent 8 }}
19+ {{- end }}
20+ labels :
21+ {{- include "bingo.selectorLabels" . | nindent 8 }}
22+ spec :
23+ {{- with .Values.imagePullSecrets }}
24+ imagePullSecrets :
25+ {{- toYaml . | nindent 8 }}
26+ {{- end }}
27+ serviceAccountName : {{ include "bingo.serviceAccountName" . }}
28+ securityContext :
29+ {{- toYaml .Values.podSecurityContext | nindent 8 }}
30+ containers :
31+ - name : {{ .Chart.Name }}
32+ securityContext :
33+ {{- toYaml .Values.securityContext | nindent 12 }}
34+ image : " {{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
35+ imagePullPolicy : {{ .Values.image.pullPolicy }}
36+ env :
37+ - name : BUILD_ENVIRONMENT
38+ value : {{ .Values.env.BUILD_ENVIRONMENT }}
39+ ports :
40+ - name : http
41+ containerPort : {{ .Values.service.port }}
42+ protocol : TCP
43+ livenessProbe :
44+ httpGet :
45+ path : /
46+ port : http
47+ initialDelaySeconds : 30
48+ periodSeconds : 10
49+ readinessProbe :
50+ httpGet :
51+ path : /
52+ port : http
53+ initialDelaySeconds : 5
54+ periodSeconds : 5
55+ resources :
56+ {{- toYaml .Values.resources | nindent 12 }}
57+ volumeMounts :
58+ {{- if .Values.persistence.enabled }}
59+ - name : phrases-volume
60+ mountPath : {{ .Values.persistence.phrasesPath }}
61+ subPath : phrases.txt
62+ - name : static-volume
63+ mountPath : {{ .Values.persistence.staticPath }}
64+ {{- end }}
65+ {{- with .Values.nodeSelector }}
66+ nodeSelector :
67+ {{- toYaml . | nindent 8 }}
68+ {{- end }}
69+ {{- with .Values.affinity }}
70+ affinity :
71+ {{- toYaml . | nindent 8 }}
72+ {{- end }}
73+ {{- with .Values.tolerations }}
74+ tolerations :
75+ {{- toYaml . | nindent 8 }}
76+ {{- end }}
77+ volumes :
78+ {{- if .Values.persistence.enabled }}
79+ - name : phrases-volume
80+ persistentVolumeClaim :
81+ claimName : {{ include "bingo.fullname" . }}-phrases
82+ - name : static-volume
83+ persistentVolumeClaim :
84+ claimName : {{ include "bingo.fullname" . }}-static
85+ {{- end }}
0 commit comments