Skip to content

Commit 29bd95d

Browse files
committed
add image.tag overrides for all jobs
1 parent 504c68d commit 29bd95d

File tree

3 files changed

+16
-7
lines changed

3 files changed

+16
-7
lines changed

templates/deployments.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1213,7 +1213,7 @@ spec:
12131213
{{- end }}
12141214
# Sidecar container for generating st2client config with st2 username & password pair and sharing produced file with the main container
12151215
- name: generate-st2client-config
1216-
image: '{{ template "imageRepository" . }}/st2actionrunner:{{ tpl (.Values.st2client.image.tag | default .Values.image.tag) . }}'
1216+
image: '{{ template "imageRepository" . }}/st2actionrunner:{{ tpl (.Values.st2client.image.tag | default (.Values.st2actionrunner.image.tag | default .Values.image.tag)) . }}'
12171217
imagePullPolicy: {{ .Values.image.pullPolicy }}
12181218
envFrom:
12191219
- configMapRef:

templates/jobs.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ spec:
3737
{{- end }}
3838
containers:
3939
- name: st2-apply-rbac-definitions
40-
image: '{{ template "imageRepository" . }}/st2actionrunner:{{ .Chart.AppVersion }}'
40+
image: '{{ template "imageRepository" . }}/st2actionrunner:{{ tpl (.Values.jobs.image.tag | default (.Values.st2actionrunner.image.tag | default .Values.image.tag)) . }}'
4141
imagePullPolicy: {{ .Values.image.pullPolicy }}
4242
command:
4343
- st2-apply-rbac-definitions
@@ -125,7 +125,7 @@ spec:
125125
done
126126
# Sidecar container for generating st2client config with st2 username & password pair and sharing produced file with the main container
127127
- name: generate-st2client-config
128-
image: '{{ template "imageRepository" . }}/st2actionrunner:{{ .Chart.AppVersion }}'
128+
image: '{{ template "imageRepository" . }}/st2actionrunner:{{ tpl (.Values.jobs.image.tag | default (.Values.st2actionrunner.image.tag | default .Values.image.tag)) . }}'
129129
imagePullPolicy: {{ .Values.image.pullPolicy }}
130130
envFrom:
131131
- configMapRef:
@@ -156,7 +156,7 @@ spec:
156156
EOT
157157
containers:
158158
- name: st2-apikey-load
159-
image: '{{ template "imageRepository" . }}/st2actionrunner:{{ .Chart.AppVersion }}'
159+
image: '{{ template "imageRepository" . }}/st2actionrunner:{{ tpl (.Values.jobs.image.tag | default (.Values.st2actionrunner.image.tag | default .Values.image.tag)) . }}'
160160
imagePullPolicy: {{ .Values.image.pullPolicy }}
161161
command:
162162
- st2
@@ -223,7 +223,7 @@ spec:
223223
{{ include "init-containers-wait-for-db" . | indent 6 }}
224224
# Sidecar container for generating st2client config with st2 username & password pair and sharing produced file with the main container
225225
- name: generate-st2client-config
226-
image: '{{ template "imageRepository" . }}/st2actionrunner:{{ .Chart.AppVersion }}'
226+
image: '{{ template "imageRepository" . }}/st2actionrunner:{{ tpl (.Values.jobs.image.tag | default (.Values.st2actionrunner.image.tag | default .Values.image.tag)) . }}'
227227
imagePullPolicy: {{ .Values.image.pullPolicy }}
228228
envFrom:
229229
- configMapRef:
@@ -254,7 +254,7 @@ spec:
254254
EOT
255255
containers:
256256
- name: st2-key-load
257-
image: '{{ template "imageRepository" . }}/st2actionrunner:{{ .Chart.AppVersion }}'
257+
image: '{{ template "imageRepository" . }}/st2actionrunner:{{ tpl (.Values.jobs.image.tag | default (.Values.st2actionrunner.image.tag | default .Values.image.tag)) . }}'
258258
imagePullPolicy: {{ .Values.image.pullPolicy }}
259259
command:
260260
- st2
@@ -336,7 +336,7 @@ spec:
336336
{{ end }}
337337
containers:
338338
- name: st2-register-content
339-
image: '{{ template "imageRepository" . }}/st2actionrunner:{{ .Chart.AppVersion }}'
339+
image: '{{ template "imageRepository" . }}/st2actionrunner:{{ tpl (.Values.jobs.image.tag | default (.Values.st2actionrunner.image.tag | default .Values.image.tag)) . }}'
340340
imagePullPolicy: {{ .Values.image.pullPolicy }}
341341
command:
342342
- st2-register-content

values.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -505,6 +505,15 @@ st2chatops:
505505
serviceAccount:
506506
attach: false
507507

508+
##
509+
## Various batch jobs (apply-rbac-definitions, apikey-load, key-load, register-content)
510+
##
511+
jobs:
512+
# Override default image settings (for now, only tag can be overridden)
513+
image: {}
514+
## Note that Helm templating is supported in this block!
515+
#tag: "{{ .Values.image.tag }}"
516+
508517
##
509518
## MongoDB HA configuration (3rd party chart dependency)
510519
##

0 commit comments

Comments
 (0)