1+ {{- $imageCfg := dict "global" $.Values.global.image "local" $.Values.image -}}
2+ apiVersion : apps/v1
3+ kind : Deployment
4+ metadata :
5+ name : {{ include "event-queue.fullname" . }}
6+ labels :
7+ {{- include "event-queue.labels" . | nindent 4 }}
8+ {{- if .Values.deployment.labels -}}
9+ {{- toYaml .Values.deployment.labels | nindent 4 }}
10+ {{- end }}
11+ annotations :
12+ {{- if .Values.deployment.annotations -}}
13+ {{- toYaml .Values.deployment.annotations | nindent 4 }}
14+ {{- end }}
15+ spec :
16+ replicas : {{ .Values.replica }}
17+ selector :
18+ matchLabels :
19+ {{- include "ctrlplane.selectorLabels" $ | nindent 6 }}
20+ {{- include "event-queue.labels" . | nindent 6 }}
21+ template :
22+ metadata :
23+ labels :
24+ {{- include "event-queue.labels" . | nindent 8 }}
25+ annotations :
26+ {{- if .Values.pod.annotations -}}
27+ {{- toYaml .Values.pod.annotations | nindent 8 }}
28+ {{- end }}
29+ spec :
30+ serviceAccountName : {{ include "event-queue.serviceAccountName" . }}
31+ {{- if .tolerations }}
32+ tolerations :
33+ {{- toYaml .tolerations | nindent 8 }}
34+ {{- end }}
35+ {{- include "ctrlplane.nodeSelector" . | nindent 6 }}
36+ {{- include "ctrlplane.priorityClassName" . | nindent 6 }}
37+ {{- include "ctrlplane.podSecurityContext" .Values.pod.securityContext | nindent 6 }}
38+ containers :
39+ - name : event-queue
40+ image : " {{ .Values.image.repository }}:{{ .Values.image.tag }}"
41+ ports :
42+ - name : health
43+ containerPort : 3123
44+ protocol : TCP
45+ livenessProbe :
46+ httpGet :
47+ path : /healthz
48+ port : health
49+ initialDelaySeconds : 15
50+ periodSeconds : 20
51+ failureThreshold : 20
52+ readinessProbe :
53+ httpGet :
54+ path : /healthz
55+ port : health
56+ initialDelaySeconds : 5
57+ periodSeconds : 10
58+ env :
59+ - name : KAFKA_BROKERS
60+ value : {{ .Values.global.kafkaBrokers | quote }}
61+ - name : POSTGRES_URL
62+ valueFrom :
63+ secretKeyRef :
64+ name : {{ .Release.Name }}-connections
65+ key : POSTGRES_URL
66+ - name : VARIABLES_AES_256_KEY
67+ valueFrom :
68+ secretKeyRef :
69+ name : {{ .Release.Name }}-encryption-key
70+ key : AES_256_KEY
71+ {{- with (include "ctrlplane.githubBot" . | fromYaml) }}
72+ - name : GITHUB_BOT_APP_ID
73+ value : {{ .appId | quote }}
74+ - name : GITHUB_BOT_CLIENT_ID
75+ value : {{ .clientId | quote }}
76+ - name : GITHUB_BOT_CLIENT_SECRET
77+ valueFrom :
78+ secretKeyRef :
79+ name : {{ .secretRef }}
80+ key : GITHUB_BOT_CLIENT_SECRET
81+ optional : true
82+ - name : GITHUB_BOT_PRIVATE_KEY
83+ valueFrom :
84+ secretKeyRef :
85+ name : {{ .secretRef }}
86+ key : GITHUB_BOT_PRIVATE_KEY
87+ optional : true
88+ - name : GITHUB_BOT_NAME
89+ value : {{ .name }}
90+ {{- end }}
91+ {{- include "ctrlplane.extraEnv" . | nindent 12 }}
92+ {{- include "ctrlplane.extraEnvFrom" (dict "root" $ "local" .) | nindent 12 }}
93+ - name : ENABLE_NEW_POLICY_ENGINE
94+ value : {{ .Values.global.enableNewPolicyEngine | quote }}
95+ resources :
96+ {{- toYaml .Values.resources | nindent 12 }}
0 commit comments