Skip to content

Commit 504c68d

Browse files
committed
add image.tag overrides for all deployments
1 parent d3a794c commit 504c68d

File tree

3 files changed

+77
-18
lines changed

3 files changed

+77
-18
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Add optional imagePullSecrets to ServiceAccount using `serviceAccount.pullSecret` from values.yaml. If pods do not have imagePullSecrets (eg without `image.pullSecret` in values.yaml), k8s populates them from the ServiceAccount. (#196) (by @cognifloyd)
77
* Reformat some yaml strings so that single quotes wrap strings that include double quotes (#194) (by @cognifloyd)
88
* st2chatops change: If `st2chatops.env.ST2_API_KEY` is defined, do not set `ST2_AUTH_USERNAME` or `ST2_AUTH_PASSWORD` env vars any more. (#197) (by @cognifloyd)
9-
9+
* Add image.tag overrides for all deployments. (#200) (by @cognifloyd)
1010

1111
## v0.60.0
1212
* Switch st2 version to `v3.5dev` as a new latest development version (#187)

templates/deployments.yaml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ spec:
4545
{{ include "init-containers-wait-for-mq" . | indent 6 }}
4646
# Sidecar container for generating .htpasswd with st2 username & password pair and sharing produced file with the main st2auth container
4747
- name: generate-htpasswd
48-
image: '{{ template "imageRepository" . }}/st2auth:{{ .Chart.AppVersion }}'
48+
image: '{{ template "imageRepository" . }}/st2auth:{{ tpl (.Values.st2auth.image.tag | default .Values.image.tag) . }}'
4949
imagePullPolicy: {{ .Values.image.pullPolicy }}
5050
env:
5151
- name: ST2_AUTH_USERNAME
@@ -67,7 +67,7 @@ spec:
6767
- printf "${ST2_AUTH_USERNAME}:$(openssl passwd -apr1 "${ST2_AUTH_PASSWORD}")\n" > /tmp/st2/htpasswd
6868
containers:
6969
- name: st2auth
70-
image: '{{ template "imageRepository" . }}/st2auth:{{ .Chart.AppVersion }}'
70+
image: '{{ template "imageRepository" . }}/st2auth:{{ tpl (.Values.st2auth.image.tag | default .Values.image.tag) . }}'
7171
imagePullPolicy: {{ .Values.image.pullPolicy }}
7272
ports:
7373
- containerPort: 9100
@@ -161,7 +161,7 @@ spec:
161161
{{- end }}
162162
containers:
163163
- name: st2api
164-
image: '{{ template "imageRepository" . }}/st2api:{{ .Chart.AppVersion }}'
164+
image: '{{ template "imageRepository" . }}/st2api:{{ tpl (.Values.st2api.image.tag | default .Values.image.tag) . }}'
165165
imagePullPolicy: {{ .Values.image.pullPolicy }}
166166
ports:
167167
- containerPort: 9101
@@ -265,7 +265,7 @@ spec:
265265
{{ include "init-containers-wait-for-mq" . | indent 6 }}
266266
containers:
267267
- name: st2stream
268-
image: '{{ template "imageRepository" . }}/st2stream:{{ .Chart.AppVersion }}'
268+
image: '{{ template "imageRepository" . }}/st2stream:{{ tpl (.Values.st2stream.image.tag | default .Values.image.tag) . }}'
269269
imagePullPolicy: {{ .Values.image.pullPolicy }}
270270
ports:
271271
- containerPort: 9102
@@ -340,7 +340,7 @@ spec:
340340
{{- end }}
341341
containers:
342342
- name: st2web
343-
image: '{{ template "imageRepository" . }}/st2web:{{ .Chart.AppVersion }}'
343+
image: '{{ template "imageRepository" . }}/st2web:{{ tpl (.Values.st2web.image.tag | default .Values.image.tag) . }}'
344344
imagePullPolicy: {{ .Values.image.pullPolicy }}
345345
ports:
346346
- containerPort: 80
@@ -441,7 +441,7 @@ spec:
441441
{{ include "init-containers-wait-for-mq" . | indent 6 }}
442442
containers:
443443
- name: st2rulesengine
444-
image: '{{ template "imageRepository" . }}/st2rulesengine:{{ .Chart.AppVersion }}'
444+
image: '{{ template "imageRepository" . }}/st2rulesengine:{{ tpl (.Values.st2rulesengine.image.tag | default .Values.image.tag) . }}'
445445
imagePullPolicy: {{ .Values.image.pullPolicy }}
446446
# TODO: Add liveness/readiness probes (#3)
447447
#livenessProbe:
@@ -528,7 +528,7 @@ spec:
528528
{{ include "init-containers-wait-for-mq" . | indent 6 }}
529529
containers:
530530
- name: st2timersengine
531-
image: '{{ template "imageRepository" . }}/st2timersengine:{{ .Chart.AppVersion }}'
531+
image: '{{ template "imageRepository" . }}/st2timersengine:{{ tpl (.Values.st2timersengine.image.tag | default .Values.image.tag) . }}'
532532
imagePullPolicy: {{ .Values.image.pullPolicy }}
533533
# TODO: Add liveness/readiness probes (#3)
534534
#livenessProbe:
@@ -607,7 +607,7 @@ spec:
607607
{{ include "init-containers-wait-for-mq" . | indent 6 }}
608608
containers:
609609
- name: st2workflowengine
610-
image: '{{ template "imageRepository" . }}/st2workflowengine:{{ .Chart.AppVersion }}'
610+
image: '{{ template "imageRepository" . }}/st2workflowengine:{{ tpl (.Values.st2workflowengine.image.tag | default .Values.image.tag) . }}'
611611
imagePullPolicy: {{ .Values.image.pullPolicy }}
612612
# TODO: Add liveness/readiness probes (#3)
613613
#livenessProbe:
@@ -698,7 +698,7 @@ spec:
698698
{{ include "init-containers-wait-for-mq" . | indent 6 }}
699699
containers:
700700
- name: st2scheduler
701-
image: '{{ template "imageRepository" . }}/st2scheduler:{{ .Chart.AppVersion }}'
701+
image: '{{ template "imageRepository" . }}/st2scheduler:{{ tpl (.Values.st2scheduler.image.tag | default .Values.image.tag) . }}'
702702
imagePullPolicy: {{ .Values.image.pullPolicy }}
703703
# TODO: Add liveness/readiness probes (#3)
704704
#livenessProbe:
@@ -789,7 +789,7 @@ spec:
789789
{{ include "init-containers-wait-for-mq" . | indent 6 }}
790790
containers:
791791
- name: st2notifier
792-
image: '{{ template "imageRepository" . }}/st2notifier:{{ .Chart.AppVersion }}'
792+
image: '{{ template "imageRepository" . }}/st2notifier:{{ tpl (.Values.st2notifier.image.tag | default .Values.image.tag) . }}'
793793
imagePullPolicy: {{ .Values.image.pullPolicy }}
794794
# TODO: Add liveness/readiness probes (#3)
795795
#livenessProbe:
@@ -881,7 +881,7 @@ spec:
881881
{{- end }}
882882
containers:
883883
- name: st2sensorcontainer{{ template "hyphenPrefix" .name }}
884-
image: '{{ template "imageRepository" $ }}/st2sensorcontainer:{{ $.Chart.AppVersion }}'
884+
image: '{{ template "imageRepository" $ }}/st2sensorcontainer:{{ tpl (.image.tag | default $.Values.image.tag) $ }}'
885885
imagePullPolicy: {{ $.Values.image.pullPolicy }}
886886
{{- with .readinessProbe }}
887887
# Probe to check if app is running. Failure will lead to a pod restart.
@@ -1015,7 +1015,7 @@ spec:
10151015
{{- end }}
10161016
containers:
10171017
- name: st2actionrunner
1018-
image: '{{ template "imageRepository" . }}/st2actionrunner:{{ .Chart.AppVersion }}'
1018+
image: '{{ template "imageRepository" . }}/st2actionrunner:{{ tpl (.Values.st2actionrunner.image.tag | default .Values.image.tag) . }}'
10191019
imagePullPolicy: {{ .Values.image.pullPolicy }}
10201020
# TODO: Add liveness/readiness probes (#3)
10211021
#livenessProbe:
@@ -1128,7 +1128,7 @@ spec:
11281128
{{ include "init-containers-wait-for-mq" . | indent 6 }}
11291129
containers:
11301130
- name: st2garbagecollector
1131-
image: '{{ template "imageRepository" . }}/st2garbagecollector:{{ .Chart.AppVersion }}'
1131+
image: '{{ template "imageRepository" . }}/st2garbagecollector:{{ tpl (.Values.st2garbagecollector.image.tag | default .Values.image.tag) . }}'
11321132
imagePullPolicy: {{ .Values.image.pullPolicy }}
11331133
# TODO: Add liveness/readiness probes (#3)
11341134
#livenessProbe:
@@ -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:{{ .Chart.AppVersion }}'
1216+
image: '{{ template "imageRepository" . }}/st2actionrunner:{{ tpl (.Values.st2client.image.tag | default .Values.image.tag) . }}'
12171217
imagePullPolicy: {{ .Values.image.pullPolicy }}
12181218
envFrom:
12191219
- configMapRef:
@@ -1244,7 +1244,7 @@ spec:
12441244
EOT
12451245
containers:
12461246
- name: st2client
1247-
image: '{{ template "imageRepository" . }}/st2actionrunner:{{ .Chart.AppVersion }}'
1247+
image: '{{ template "imageRepository" . }}/st2actionrunner:{{ tpl (.Values.st2client.image.tag | default .Values.image.tag) . }}'
12481248
imagePullPolicy: {{ .Values.image.pullPolicy }}
12491249
env:
12501250
- name: ST2CLIENT
@@ -1374,7 +1374,7 @@ spec:
13741374
{{- end }}
13751375
containers:
13761376
- name: st2chatops
1377-
image: '{{ .Values.st2chatops.image.repository | default "stackstorm" }}/{{ .Values.st2chatops.image.name | default "st2chatops" }}:{{ tpl (.Values.st2chatops.image.tag | default .Chart.AppVersion) . }}'
1377+
image: '{{ .Values.st2chatops.image.repository | default "stackstorm" }}/{{ .Values.st2chatops.image.name | default "st2chatops" }}:{{ tpl (.Values.st2chatops.image.tag | default .Values.image.tag) . }}'
13781378
imagePullPolicy: {{ .Values.st2chatops.image.pullPolicy | default .Values.image.pullPolicy }}
13791379
{{- if not (hasKey .Values.st2chatops.env "ST2_API_KEY") }}
13801380
env:

values.yaml

Lines changed: 60 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ image:
1212
# st2chatops and st2packs (which have their own override). This also does not impact
1313
# dependencies such as mongo or redis, which have their own helm chart settings.
1414
repository: ""
15+
# st2 image tag - defaults to AppVersion.
16+
# Note that Helm templating is supported in this block!
17+
tag: "{{ .Chart.AppVersion }}"
1518
# Image pull secret.
1619
# May be required for public docker hub due to rate limiting or any private repository.
1720
# See: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
@@ -84,6 +87,10 @@ st2:
8487
requests:
8588
memory: "100Mi"
8689
cpu: "50m"
90+
# Override default image settings (for now, only tag can be overridden)
91+
image: {}
92+
## Note that Helm templating is supported in this block!
93+
#tag: "{{ .Values.image.tag }}"
8794
# Additional advanced settings to control pod/deployment placement
8895
affinity: {}
8996
nodeSelector: {}
@@ -235,6 +242,10 @@ st2web:
235242
cpu: "50m"
236243
limits:
237244
memory: "100Mi"
245+
# Override default image settings (for now, only tag can be overridden)
246+
image: {}
247+
## Note that Helm templating is supported in this block!
248+
#tag: "{{ .Values.image.tag }}"
238249
# TODO: Add Ingress setting as a way to expose service to public (#6).
239250
# ingress:
240251
service:
@@ -263,6 +274,10 @@ st2auth:
263274
requests:
264275
memory: "85Mi"
265276
cpu: "50m"
277+
# Override default image settings (for now, only tag can be overridden)
278+
image: {}
279+
## Note that Helm templating is supported in this block!
280+
#tag: "{{ .Values.image.tag }}"
266281
# Additional advanced settings to control pod/deployment placement
267282
nodeSelector: {}
268283
tolerations: []
@@ -277,6 +292,10 @@ st2api:
277292
requests:
278293
memory: "150Mi"
279294
cpu: "25m"
295+
# Override default image settings (for now, only tag can be overridden)
296+
image: {}
297+
## Note that Helm templating is supported in this block!
298+
#tag: "{{ .Values.image.tag }}"
280299
# Additional advanced settings to control pod/deployment placement
281300
nodeSelector: {}
282301
tolerations: []
@@ -291,6 +310,10 @@ st2stream:
291310
requests:
292311
memory: "100Mi"
293312
cpu: "50m"
313+
# Override default image settings (for now, only tag can be overridden)
314+
image: {}
315+
## Note that Helm templating is supported in this block!
316+
#tag: "{{ .Values.image.tag }}"
294317
# Additional advanced settings to control pod/deployment placement
295318
nodeSelector: {}
296319
tolerations: []
@@ -305,6 +328,10 @@ st2rulesengine:
305328
requests:
306329
memory: "75Mi"
307330
cpu: "25m"
331+
# Override default image settings (for now, only tag can be overridden)
332+
image: {}
333+
## Note that Helm templating is supported in this block!
334+
#tag: "{{ .Values.image.tag }}"
308335
# Additional advanced settings to control pod/deployment placement
309336
nodeSelector: {}
310337
tolerations: []
@@ -318,6 +345,10 @@ st2timersengine:
318345
requests:
319346
memory: "75Mi"
320347
cpu: "10m"
348+
# Override default image settings (for now, only tag can be overridden)
349+
image: {}
350+
## Note that Helm templating is supported in this block!
351+
#tag: "{{ .Values.image.tag }}"
321352
# Additional advanced settings to control pod/deployment placement
322353
nodeSelector: {}
323354
tolerations: []
@@ -332,6 +363,10 @@ st2workflowengine:
332363
requests:
333364
memory: "200Mi"
334365
cpu: "100m"
366+
# Override default image settings (for now, only tag can be overridden)
367+
image: {}
368+
## Note that Helm templating is supported in this block!
369+
#tag: "{{ .Values.image.tag }}"
335370
# Additional advanced settings to control pod/deployment placement
336371
nodeSelector: {}
337372
tolerations: []
@@ -346,6 +381,10 @@ st2scheduler:
346381
requests:
347382
memory: "75Mi"
348383
cpu: "50m"
384+
# Override default image settings (for now, only tag can be overridden)
385+
image: {}
386+
## Note that Helm templating is supported in this block!
387+
#tag: "{{ .Values.image.tag }}"
349388
# Additional advanced settings to control pod/deployment placement
350389
nodeSelector: {}
351390
tolerations: []
@@ -360,6 +399,10 @@ st2notifier:
360399
requests:
361400
memory: "75Mi"
362401
cpu: "50m"
402+
# Override default image settings (for now, only tag can be overridden)
403+
image: {}
404+
## Note that Helm templating is supported in this block!
405+
#tag: "{{ .Values.image.tag }}"
363406
# Additional advanced settings to control pod/deployment placement
364407
nodeSelector: {}
365408
tolerations: []
@@ -375,6 +418,10 @@ st2actionrunner:
375418
requests:
376419
memory: "200Mi"
377420
cpu: "75m"
421+
# Override default image settings (for now, only tag can be overridden)
422+
image: {}
423+
## Note that Helm templating is supported in this block!
424+
#tag: "{{ .Values.image.tag }}"
378425
annotations: {}
379426
# Additional advanced settings to control pod/deployment placement
380427
nodeSelector: {}
@@ -392,6 +439,14 @@ st2actionrunner:
392439
serviceAccount:
393440
attach: false
394441

442+
# The st2client deployment/pod simplifies ad-hoc administration.
443+
# st2client is a special purpose actionrunner pod, but you can customize it separately
444+
st2client:
445+
# Override default image settings (for now, only tag can be overridden)
446+
image: {}
447+
## Note that Helm templating is supported in this block!
448+
#tag: "{{ .Values.image.tag }}"
449+
395450
# https://docs.stackstorm.com/reference/ha.html#st2garbagecollector
396451
# Optional service that cleans up old executions and other operations data based on setup configurations.
397452
# By default this process does nothing and needs to be setup in st2.conf to perform any work.
@@ -402,6 +457,10 @@ st2garbagecollector:
402457
requests:
403458
memory: "80Mi"
404459
cpu: "10m"
460+
# Override default image settings (for now, only tag can be overridden)
461+
image: {}
462+
## Note that Helm templating is supported in this block!
463+
#tag: "{{ .Values.image.tag }}"
405464
# Additional advanced settings to control pod/deployment placement
406465
nodeSelector: {}
407466
tolerations: []
@@ -431,7 +490,7 @@ st2chatops:
431490
#repository: stackstorm
432491
#name: st2chatops
433492
## Note that Helm templating is supported in this block!
434-
#tag: "{{ .Chart.AppVersion }}"
493+
#tag: "{{ .Values.image.tag }}"
435494
#pullPolicy: IfNotPresent
436495
# Tested requested resource consumption for st2chatops & hubot in normal mode
437496
# Please adjust based on your conscious choice

0 commit comments

Comments
 (0)