Skip to content

Commit ab45bd1

Browse files
committed
feat: add imagePullSecrets
1 parent 16c5976 commit ab45bd1

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed

toggle-django-helm/templates/_helpers.tpl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,10 @@ Generate image metadata
9090
-}}
9191
image: "{{ printf "%s:%s" $merged.name $merged.tag }}"
9292
imagePullPolicy: {{ default "IfNotPresent" $merged.imagePullPolicy }}
93+
{{- with $merged.imagePullSecrets }}
94+
imagePullSecrets:
95+
{{- toYaml . | nindent 2 }}
96+
{{- end }}
9397
{{- end }}
9498

9599
{{/*

toggle-django-helm/tests/values-2.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ image:
2424
name: ghcr.io/example/example
2525
tag: v1.0.1
2626
imagePullPolicy: IfNotPresent
27+
imagePullSecrets:
28+
- name: regcred
2729

2830
ingress:
2931
enabled: true

toggle-django-helm/values.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ image: {}
1111
# name:
1212
# tag:
1313
# imagePullPolicy: IfNotPresent
14+
# imagePullSecrets:
1415

1516
ingress:
1617
enabled: false
@@ -107,6 +108,7 @@ api:
107108
# name: WORKER-SET-BY-CICD-IMAGE
108109
# tag: WORKER-SET-BY-CICD-TAG
109110
# imagePullPolicy: IfNotPresent
111+
# imagePullSecrets:
110112
enabled: true
111113
replicaCount: 1
112114
containerPort: 80
@@ -125,12 +127,14 @@ worker:
125127
# name: WORKER-SET-BY-CICD-IMAGE
126128
# tag: WORKER-SET-BY-CICD-TAG
127129
# imagePullPolicy: IfNotPresent
130+
# imagePullSecrets:
128131
enabled: true
129132
beat:
130133
image: {}
131134
# name: WORKER-SET-BY-CICD-IMAGE
132135
# tag: WORKER-SET-BY-CICD-TAG
133136
# imagePullPolicy: IfNotPresent
137+
# imagePullSecrets:
134138
command: ["celery", "-A", "myapp", "beat", "-l", "INFO"]
135139
resources:
136140
requests:
@@ -144,6 +148,7 @@ worker:
144148
# name: WORKER-SET-BY-CICD-IMAGE
145149
# tag: WORKER-SET-BY-CICD-TAG
146150
# imagePullPolicy: IfNotPresent
151+
# imagePullSecrets:
147152
enabled: false # Install flower package first
148153
command: ["celery", "-A", "myapp", "flower", "--port=8000"]
149154
resources:
@@ -193,6 +198,7 @@ cronjobs:
193198
# name: CRONJOB-SET-BY-CICD-IMAGE
194199
# tag: CRONJOB-SET-BY-CICD-TAG
195200
# imagePullPolicy: IfNotPresent
201+
# imagePullSecrets:
196202
defaultResources:
197203
requests:
198204
cpu: "1"
@@ -215,6 +221,7 @@ argoHook:
215221
# name: WORKER-SET-BY-CICD-IMAGE
216222
# tag: WORKER-SET-BY-CICD-TAG
217223
# imagePullPolicy: IfNotPresent
224+
# imagePullSecrets:
218225
resources:
219226
requests:
220227
cpu: "0.1"

0 commit comments

Comments
 (0)