Skip to content

Commit 18de1fe

Browse files
authored
Merge branch 'master' into st2-conf-helper
2 parents 6311184 + aa95c1a commit 18de1fe

File tree

5 files changed

+64
-2
lines changed

5 files changed

+64
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
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)
99
* Add image.tag overrides for all deployments. (#200) (by @cognifloyd)
10+
* If your k8s cluster admin requires custom annotations (eg: to indicate mongo or rabbitmq usage), you can now add those to each set of pods. (#195) (by @cognifloyd)
1011
* Move st2-config-vol volume definition and list of st2-config-vol volumeMounts to helpers to reduce duplication (#198) (by @cognifloyd)
1112

1213
## v0.60.0

templates/deployments.yaml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ spec:
3535
annotations:
3636
checksum/config: {{ include (print $.Template.BasePath "/configmaps_st2-conf.yaml") . | sha256sum }}
3737
checksum/auth: {{ include (print $.Template.BasePath "/secrets_st2auth.yaml") . | sha256sum }}
38+
{{- if .Values.st2auth.annotations }}
39+
{{ toYaml .Values.st2auth.annotations | indent 8 }}
40+
{{- end }}
3841
spec:
3942
imagePullSecrets:
4043
{{- if .Values.image.pullSecret }}
@@ -138,6 +141,9 @@ spec:
138141
annotations:
139142
checksum/config: {{ include (print $.Template.BasePath "/configmaps_st2-conf.yaml") . | sha256sum }}
140143
checksum/datastore-key: {{ include (print $.Template.BasePath "/secrets_datastore_crypto_key.yaml") . | sha256sum }}
144+
{{- if .Values.st2api.annotations }}
145+
{{ toYaml .Values.st2api.annotations | indent 8 }}
146+
{{- end }}
141147
spec:
142148
imagePullSecrets:
143149
{{- if .Values.image.pullSecret }}
@@ -241,6 +247,9 @@ spec:
241247
heritage: {{ .Release.Service }}
242248
annotations:
243249
checksum/config: {{ include (print $.Template.BasePath "/configmaps_st2-conf.yaml") . | sha256sum }}
250+
{{- if .Values.st2stream.annotations }}
251+
{{ toYaml .Values.st2stream.annotations | indent 8 }}
252+
{{- end }}
244253
spec:
245254
imagePullSecrets:
246255
{{- if .Values.image.pullSecret }}
@@ -312,6 +321,9 @@ spec:
312321
heritage: {{ .Release.Service }}
313322
annotations:
314323
checksum/config: {{ include (print $.Template.BasePath "/configmaps_st2web.yaml") . | sha256sum }}
324+
{{- if .Values.st2web.annotations }}
325+
{{ toYaml .Values.st2web.annotations | indent 8 }}
326+
{{- end }}
315327
spec:
316328
imagePullSecrets:
317329
{{- if .Values.image.pullSecret }}
@@ -410,6 +422,9 @@ spec:
410422
heritage: {{ .Release.Service }}
411423
annotations:
412424
checksum/config: {{ include (print $.Template.BasePath "/configmaps_st2-conf.yaml") . | sha256sum }}
425+
{{- if .Values.st2rulesengine.annotations }}
426+
{{ toYaml .Values.st2rulesengine.annotations | indent 8 }}
427+
{{- end }}
413428
spec:
414429
imagePullSecrets:
415430
{{- if .Values.image.pullSecret }}
@@ -490,6 +505,9 @@ spec:
490505
heritage: {{ .Release.Service }}
491506
annotations:
492507
checksum/config: {{ include (print $.Template.BasePath "/configmaps_st2-conf.yaml") . | sha256sum }}
508+
{{- if .Values.st2timersengine.annotations }}
509+
{{ toYaml .Values.st2timersengine.annotations | indent 8 }}
510+
{{- end }}
493511
spec:
494512
imagePullSecrets:
495513
{{- if .Values.image.pullSecret }}
@@ -562,6 +580,9 @@ spec:
562580
annotations:
563581
checksum/config: {{ include (print $.Template.BasePath "/configmaps_st2-conf.yaml") . | sha256sum }}
564582
checksum/datastore-key: {{ include (print $.Template.BasePath "/secrets_datastore_crypto_key.yaml") . | sha256sum }}
583+
{{- if .Values.st2workflowengine.annotations }}
584+
{{ toYaml .Values.st2workflowengine.annotations | indent 8 }}
585+
{{- end }}
565586
spec:
566587
imagePullSecrets:
567588
{{- if .Values.image.pullSecret }}
@@ -646,6 +667,9 @@ spec:
646667
annotations:
647668
checksum/config: {{ include (print $.Template.BasePath "/configmaps_st2-conf.yaml") . | sha256sum }}
648669
checksum/datastore-key: {{ include (print $.Template.BasePath "/secrets_datastore_crypto_key.yaml") . | sha256sum }}
670+
{{- if .Values.st2scheduler.annotations }}
671+
{{ toYaml .Values.st2scheduler.annotations | indent 8 }}
672+
{{- end }}
649673
spec:
650674
imagePullSecrets:
651675
{{- if .Values.image.pullSecret }}
@@ -730,6 +754,9 @@ spec:
730754
heritage: {{ .Release.Service }}
731755
annotations:
732756
checksum/config: {{ include (print $.Template.BasePath "/configmaps_st2-conf.yaml") . | sha256sum }}
757+
{{- if .Values.st2notifier.annotations }}
758+
{{ toYaml .Values.st2notifier.annotations | indent 8 }}
759+
{{- end }}
733760
spec:
734761
imagePullSecrets:
735762
{{- if .Values.image.pullSecret }}
@@ -1048,6 +1075,9 @@ spec:
10481075
heritage: {{ .Release.Service }}
10491076
annotations:
10501077
checksum/config: {{ include (print $.Template.BasePath "/configmaps_st2-conf.yaml") . | sha256sum }}
1078+
{{- if .Values.st2garbagecollector.annotations }}
1079+
{{ toYaml .Values.st2garbagecollector.annotations | indent 8 }}
1080+
{{- end }}
10511081
spec:
10521082
imagePullSecrets:
10531083
{{- if .Values.image.pullSecret }}
@@ -1122,6 +1152,9 @@ spec:
11221152
checksum/auth: {{ include (print $.Template.BasePath "/secrets_st2auth.yaml") . | sha256sum }}
11231153
checksum/ssh: {{ include (print $.Template.BasePath "/secrets_ssh.yaml") . | sha256sum }}
11241154
checksum/datastore-key: {{ include (print $.Template.BasePath "/secrets_datastore_crypto_key.yaml") . | sha256sum }}
1155+
{{- if .Values.st2client.annotations }}
1156+
{{ toYaml .Values.st2client.annotations | indent 8 }}
1157+
{{- end }}
11251158
spec:
11261159
imagePullSecrets:
11271160
{{- if .Values.st2.packs.images }}
@@ -1283,6 +1316,9 @@ spec:
12831316
heritage: {{ .Release.Service }}
12841317
annotations:
12851318
checksum/chatops: {{ include (print $.Template.BasePath "/secrets_st2chatops.yaml") . | sha256sum }}
1319+
{{- if .Values.st2chatops.annotations }}
1320+
{{ toYaml .Values.st2chatops.annotations | indent 8 }}
1321+
{{- end }}
12861322
spec:
12871323
{{- if .Values.image.pullSecret }}
12881324
imagePullSecrets:

templates/ingress.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ metadata:
1515
{{- if .Values.ingress.tls }}
1616
ingress.kubernetes.io/secure-backends: "true"
1717
{{- end }}
18-
{{- range $key, $value := .Values.ingress.annotations }}
19-
{{ $key }}: {{ $value | quote }}
18+
{{- if .Values.ingress.annotations }}
19+
{{ toYaml .Values.ingress.annotations | indent 4 }}
2020
{{- end }}
2121
spec:
2222
rules:

templates/jobs.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ spec:
3030
# TODO: Investigate/propose running Helm hook only on condition when ConfigMap or Secret has changed
3131
checksum/config: {{ include (print $.Template.BasePath "/configmaps_st2-conf.yaml") . | sha256sum }}
3232
checksum/rbac: {{ include (print $.Template.BasePath "/configmaps_rbac.yaml") . | sha256sum }}
33+
{{- if .Values.jobs.annotations }}
34+
{{ toYaml .Values.jobs.annotations | indent 8 }}
35+
{{- end }}
3336
spec:
3437
imagePullSecrets:
3538
{{- if .Values.image.pullSecret }}
@@ -100,6 +103,9 @@ spec:
100103
# TODO: Investigate/propose running Helm hook only on condition when ConfigMap or Secret has changed
101104
checksum/urls: {{ include (print $.Template.BasePath "/configmaps_st2-urls.yaml") . | sha256sum }}
102105
checksum/apikeys: {{ include (print $.Template.BasePath "/secrets_st2apikeys.yaml") . | sha256sum }}
106+
{{- if .Values.jobs.annotations }}
107+
{{ toYaml .Values.jobs.annotations | indent 8 }}
108+
{{- end }}
103109
spec:
104110
imagePullSecrets:
105111
{{- if .Values.image.pullSecret }}
@@ -207,6 +213,9 @@ spec:
207213
# TODO: Investigate/propose running Helm hook only on condition when ConfigMap or Secret has changed
208214
checksum/config: {{ include (print $.Template.BasePath "/configmaps_st2-conf.yaml") . | sha256sum }}
209215
checksum/urls: {{ include (print $.Template.BasePath "/configmaps_st2-urls.yaml") . | sha256sum }}
216+
{{- if .Values.jobs.annotations }}
217+
{{ toYaml .Values.jobs.annotations | indent 8 }}
218+
{{- end }}
210219
spec:
211220
imagePullSecrets:
212221
{{- if .Values.image.pullSecret }}
@@ -307,6 +316,9 @@ spec:
307316
# TODO: Investigate/propose running Helm hook only on condition when ConfigMap or Secret has changed
308317
checksum/config: {{ include (print $.Template.BasePath "/configmaps_st2-conf.yaml") . | sha256sum }}
309318
checksum/packs: {{ include (print $.Template.BasePath "/configmaps_packs.yaml") . | sha256sum }}
319+
{{- if .Values.jobs.annotations }}
320+
{{ toYaml .Values.jobs.annotations | indent 8 }}
321+
{{- end }}
310322
spec:
311323
imagePullSecrets:
312324
{{- if .Values.image.pullSecret }}

values.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,7 @@ st2web:
242242
cpu: "50m"
243243
limits:
244244
memory: "100Mi"
245+
annotations: {}
245246
# Override default image settings (for now, only tag can be overridden)
246247
image: {}
247248
## Note that Helm templating is supported in this block!
@@ -274,6 +275,7 @@ st2auth:
274275
requests:
275276
memory: "85Mi"
276277
cpu: "50m"
278+
annotations: {}
277279
# Override default image settings (for now, only tag can be overridden)
278280
image: {}
279281
## Note that Helm templating is supported in this block!
@@ -292,6 +294,7 @@ st2api:
292294
requests:
293295
memory: "150Mi"
294296
cpu: "25m"
297+
annotations: {}
295298
# Override default image settings (for now, only tag can be overridden)
296299
image: {}
297300
## Note that Helm templating is supported in this block!
@@ -310,6 +313,7 @@ st2stream:
310313
requests:
311314
memory: "100Mi"
312315
cpu: "50m"
316+
annotations: {}
313317
# Override default image settings (for now, only tag can be overridden)
314318
image: {}
315319
## Note that Helm templating is supported in this block!
@@ -328,6 +332,7 @@ st2rulesengine:
328332
requests:
329333
memory: "75Mi"
330334
cpu: "25m"
335+
annotations: {}
331336
# Override default image settings (for now, only tag can be overridden)
332337
image: {}
333338
## Note that Helm templating is supported in this block!
@@ -345,6 +350,7 @@ st2timersengine:
345350
requests:
346351
memory: "75Mi"
347352
cpu: "10m"
353+
annotations: {}
348354
# Override default image settings (for now, only tag can be overridden)
349355
image: {}
350356
## Note that Helm templating is supported in this block!
@@ -363,6 +369,7 @@ st2workflowengine:
363369
requests:
364370
memory: "200Mi"
365371
cpu: "100m"
372+
annotations: {}
366373
# Override default image settings (for now, only tag can be overridden)
367374
image: {}
368375
## Note that Helm templating is supported in this block!
@@ -381,6 +388,7 @@ st2scheduler:
381388
requests:
382389
memory: "75Mi"
383390
cpu: "50m"
391+
annotations: {}
384392
# Override default image settings (for now, only tag can be overridden)
385393
image: {}
386394
## Note that Helm templating is supported in this block!
@@ -399,6 +407,7 @@ st2notifier:
399407
requests:
400408
memory: "75Mi"
401409
cpu: "50m"
410+
annotations: {}
402411
# Override default image settings (for now, only tag can be overridden)
403412
image: {}
404413
## Note that Helm templating is supported in this block!
@@ -442,6 +451,7 @@ st2actionrunner:
442451
# The st2client deployment/pod simplifies ad-hoc administration.
443452
# st2client is a special purpose actionrunner pod, but you can customize it separately
444453
st2client:
454+
annotations: {}
445455
# Override default image settings (for now, only tag can be overridden)
446456
image: {}
447457
## Note that Helm templating is supported in this block!
@@ -457,6 +467,7 @@ st2garbagecollector:
457467
requests:
458468
memory: "80Mi"
459469
cpu: "10m"
470+
annotations: {}
460471
# Override default image settings (for now, only tag can be overridden)
461472
image: {}
462473
## Note that Helm templating is supported in this block!
@@ -498,6 +509,7 @@ st2chatops:
498509
requests:
499510
memory: "50Mi"
500511
cpu: "5m"
512+
annotations: {}
501513
# Additional advanced settings to control pod/deployment placement
502514
nodeSelector: {}
503515
tolerations: []
@@ -509,6 +521,7 @@ st2chatops:
509521
## Various batch jobs (apply-rbac-definitions, apikey-load, key-load, register-content)
510522
##
511523
jobs:
524+
annotations: {}
512525
# Override default image settings (for now, only tag can be overridden)
513526
image: {}
514527
## Note that Helm templating is supported in this block!

0 commit comments

Comments
 (0)