File tree Expand file tree Collapse file tree 12 files changed +173
-2
lines changed
Expand file tree Collapse file tree 12 files changed +173
-2
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " helm-charts " : patch
3+ ---
4+
5+ feat: Add support for image pull secrets in deployments
Original file line number Diff line number Diff line change 2626 tolerations :
2727 {{- toYaml .Values.clickhouse.tolerations | nindent 8 }}
2828 {{- end }}
29+ {{- if .Values.global.imagePullSecrets }}
30+ imagePullSecrets :
31+ {{- toYaml .Values.global.imagePullSecrets | nindent 8 }}
32+ {{- end }}
2933 containers :
3034 - name : clickhouse
3135 image : " {{ .Values.clickhouse.image }}"
Original file line number Diff line number Diff line change 1717 {{- include "hdx-oss.selectorLabels" . | nindent 12 }}
1818 app.kubernetes.io/component : task
1919 spec :
20+ {{- if .Values.global.imagePullSecrets }}
21+ imagePullSecrets :
22+ {{- toYaml .Values.global.imagePullSecrets | nindent 12 }}
23+ {{- end }}
2024 restartPolicy : OnFailure
2125 containers :
2226 - name : task
Original file line number Diff line number Diff line change 4343 {{- if .Values.hyperdx.priorityClassName }}
4444 priorityClassName : {{ .Values.hyperdx.priorityClassName | quote }}
4545 {{- end }}
46+ {{- if .Values.global.imagePullSecrets }}
47+ imagePullSecrets :
48+ {{- toYaml .Values.global.imagePullSecrets | nindent 8 }}
49+ {{- end }}
4650 {{- if .Values.mongodb.enabled }}
4751 initContainers :
4852 - name : wait-for-mongodb
Original file line number Diff line number Diff line change 4848 tolerations :
4949 {{- toYaml .Values.mongodb.tolerations | nindent 8 }}
5050 {{- end }}
51+ {{- if .Values.global.imagePullSecrets }}
52+ imagePullSecrets :
53+ {{- toYaml .Values.global.imagePullSecrets | nindent 8 }}
54+ {{- end }}
5155 containers :
5256 - name : mongodb
5357 image : " {{ .Values.mongodb.image }}"
Original file line number Diff line number Diff line change 3232 tolerations :
3333 {{- toYaml .Values.otel.tolerations | nindent 8 }}
3434 {{- end }}
35+ {{- if .Values.global.imagePullSecrets }}
36+ imagePullSecrets :
37+ {{- toYaml .Values.global.imagePullSecrets | nindent 8 }}
38+ {{- end }}
3539 containers :
3640 - name : otel-collector
3741 image : " {{ .Values.otel.image.repository }}:{{ .Values.otel.image.tag | default .Chart.AppVersion }}"
Original file line number Diff line number Diff line change @@ -338,4 +338,29 @@ tests:
338338 of : PersistentVolumeClaim
339339 - documentIndex : 5
340340 isNull :
341- path : metadata.annotations
341+ path : metadata.annotations
342+
343+ - it : should not include imagePullSecrets when not configured
344+ set :
345+ clickhouse :
346+ enabled : true
347+ asserts :
348+ - documentIndex : 0
349+ isNull :
350+ path : spec.template.spec.imagePullSecrets
351+
352+ - it : should include imagePullSecrets when configured
353+ set :
354+ clickhouse :
355+ enabled : true
356+ global :
357+ imagePullSecrets :
358+ - name : regcred
359+ asserts :
360+ - documentIndex : 0
361+ isNotNull :
362+ path : spec.template.spec.imagePullSecrets
363+ - documentIndex : 0
364+ equal :
365+ path : spec.template.spec.imagePullSecrets[0].name
366+ value : regcred
Original file line number Diff line number Diff line change @@ -226,4 +226,47 @@ tests:
226226 value : 9000
227227 - equal :
228228 path : spec.template.spec.containers[0].readinessProbe.httpGet.port
229- value : 9000
229+ value : 9000
230+
231+ - it : should not include imagePullSecrets when not configured
232+ asserts :
233+ - isNull :
234+ path : spec.template.spec.imagePullSecrets
235+
236+ - it : should include imagePullSecrets when configured with single secret
237+ set :
238+ global :
239+ imagePullSecrets :
240+ - name : regcred
241+ asserts :
242+ - isNotNull :
243+ path : spec.template.spec.imagePullSecrets
244+ - equal :
245+ path : spec.template.spec.imagePullSecrets[0].name
246+ value : regcred
247+ - lengthEqual :
248+ path : spec.template.spec.imagePullSecrets
249+ count : 1
250+
251+ - it : should include imagePullSecrets when configured with multiple secrets
252+ set :
253+ global :
254+ imagePullSecrets :
255+ - name : regcred
256+ - name : docker-hub-secret
257+ - name : private-registry-secret
258+ asserts :
259+ - isNotNull :
260+ path : spec.template.spec.imagePullSecrets
261+ - equal :
262+ path : spec.template.spec.imagePullSecrets[0].name
263+ value : regcred
264+ - equal :
265+ path : spec.template.spec.imagePullSecrets[1].name
266+ value : docker-hub-secret
267+ - equal :
268+ path : spec.template.spec.imagePullSecrets[2].name
269+ value : private-registry-secret
270+ - lengthEqual :
271+ path : spec.template.spec.imagePullSecrets
272+ count : 3
Original file line number Diff line number Diff line change @@ -265,3 +265,28 @@ tests:
265265 equal :
266266 path : spec.storageClassName
267267 value : fast-ssd
268+
269+ - it : should not include imagePullSecrets when not configured
270+ set :
271+ mongodb :
272+ enabled : true
273+ asserts :
274+ - documentIndex : 0
275+ isNull :
276+ path : spec.template.spec.imagePullSecrets
277+
278+ - it : should include imagePullSecrets when configured
279+ set :
280+ mongodb :
281+ enabled : true
282+ global :
283+ imagePullSecrets :
284+ - name : regcred
285+ asserts :
286+ - documentIndex : 1
287+ isNotNull :
288+ path : spec.template.spec.imagePullSecrets
289+ - documentIndex : 1
290+ equal :
291+ path : spec.template.spec.imagePullSecrets[0].name
292+ value : regcred
Original file line number Diff line number Diff line change @@ -807,3 +807,28 @@ tests:
807807 equal :
808808 path : spec.template.spec.containers[0].readinessProbe.httpGet.port
809809 value : 13134
810+
811+ - it : should not include imagePullSecrets when not configured
812+ set :
813+ otel :
814+ enabled : true
815+ asserts :
816+ - documentIndex : 0
817+ isNull :
818+ path : spec.template.spec.imagePullSecrets
819+
820+ - it : should include imagePullSecrets when configured
821+ set :
822+ otel :
823+ enabled : true
824+ global :
825+ imagePullSecrets :
826+ - name : regcred
827+ asserts :
828+ - documentIndex : 0
829+ isNotNull :
830+ path : spec.template.spec.imagePullSecrets
831+ - documentIndex : 0
832+ equal :
833+ path : spec.template.spec.imagePullSecrets[0].name
834+ value : regcred
You can’t perform that action at this time.
0 commit comments