Skip to content

Commit 62c600a

Browse files
authored
Merge branch 'master' into refactor-secrets
2 parents 780fc42 + d2691ee commit 62c600a

File tree

4 files changed

+202
-78
lines changed

4 files changed

+202
-78
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
* BREAKING CHANGE: Move secrets.st2.* values into st2.* (#203) (by @cognifloyd)
1212
* Auto-generate password and ssh_key secrets. (#203) (by @cognifloyd)
1313
* Add optional hubot-scripts volume to st2chatops pod. To add this, define `st2chatops.hubotScriptsVolume`. (#207) (by @cognifloyd)
14+
* Add advanced pod placment (nodeSelector, affinity, tolerations) to specs for batch Jobs pods. (#193) (by @cognifloyd)
15+
* Allow adding dnsPolicy and/or dnsConfig to all pods. (#201) (by @cognifloyd)
1416

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

templates/deployments.yaml

Lines changed: 117 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -103,17 +103,20 @@ spec:
103103
- name: htpasswd-vol
104104
emptyDir:
105105
medium: Memory
106+
{{- if .Values.dnsPolicy }}
107+
dnsPolicy: {{ .Values.dnsPolicy }}
108+
{{- end }}
109+
{{- with .Values.dnsConfig }}
110+
dnsConfig: {{- toYaml . | nindent 8 }}
111+
{{- end }}
106112
{{- with .Values.st2auth.nodeSelector }}
107-
nodeSelector:
108-
{{ toYaml . | indent 8 }}
113+
nodeSelector: {{- toYaml . | nindent 8 }}
109114
{{- end }}
110115
{{- with .Values.st2auth.affinity }}
111-
affinity:
112-
{{ toYaml . | indent 8 }}
116+
affinity: {{- toYaml . | nindent 8 }}
113117
{{- end }}
114118
{{- with .Values.st2auth.tolerations }}
115-
tolerations:
116-
{{ toYaml . | indent 8 }}
119+
tolerations: {{- toYaml . | nindent 8 }}
117120
{{- end }}
118121

119122
---
@@ -217,17 +220,20 @@ spec:
217220
{{- if .Values.st2.packs.images }}
218221
{{- include "packs-volumes" . | indent 8 }}
219222
{{- end }}
223+
{{- if .Values.dnsPolicy }}
224+
dnsPolicy: {{ .Values.dnsPolicy }}
225+
{{- end }}
226+
{{- with .Values.dnsConfig }}
227+
dnsConfig: {{- toYaml . | nindent 8 }}
228+
{{- end }}
220229
{{- with .Values.st2api.nodeSelector }}
221-
nodeSelector:
222-
{{ toYaml . | indent 8 }}
230+
nodeSelector: {{- toYaml . | nindent 8 }}
223231
{{- end }}
224232
{{- with .Values.st2api.affinity }}
225-
affinity:
226-
{{ toYaml . | indent 8 }}
233+
affinity: {{- toYaml . | nindent 8 }}
227234
{{- end }}
228235
{{- with .Values.st2api.tolerations }}
229-
tolerations:
230-
{{ toYaml . | indent 8 }}
236+
tolerations: {{- toYaml . | nindent 8 }}
231237
{{- end }}
232238

233239
---
@@ -300,17 +306,20 @@ spec:
300306
- name: st2-config-vol
301307
configMap:
302308
name: {{ .Release.Name }}-st2-config
309+
{{- if .Values.dnsPolicy }}
310+
dnsPolicy: {{ .Values.dnsPolicy }}
311+
{{- end }}
312+
{{- with .Values.dnsConfig }}
313+
dnsConfig: {{- toYaml . | nindent 8 }}
314+
{{- end }}
303315
{{- with .Values.st2stream.nodeSelector }}
304-
nodeSelector:
305-
{{ toYaml . | indent 8 }}
316+
nodeSelector: {{- toYaml . | nindent 8 }}
306317
{{- end }}
307318
{{- with .Values.st2stream.affinity }}
308-
affinity:
309-
{{ toYaml . | indent 8 }}
319+
affinity: {{- toYaml . | nindent 8 }}
310320
{{- end }}
311321
{{- with .Values.st2stream.tolerations }}
312-
tolerations:
313-
{{ toYaml . | indent 8 }}
322+
tolerations: {{- toYaml . | nindent 8 }}
314323
{{- end }}
315324

316325
---
@@ -399,17 +408,20 @@ spec:
399408
{{- else }}
400409
volumes: []
401410
{{- end }}
411+
{{- if .Values.dnsPolicy }}
412+
dnsPolicy: {{ .Values.dnsPolicy }}
413+
{{- end }}
414+
{{- with .Values.dnsConfig }}
415+
dnsConfig: {{- toYaml . | nindent 8 }}
416+
{{- end }}
402417
{{- with .Values.st2web.nodeSelector }}
403-
nodeSelector:
404-
{{ toYaml . | indent 8 }}
418+
nodeSelector: {{- toYaml . | nindent 8 }}
405419
{{- end }}
406420
{{- with .Values.st2web.affinity }}
407-
affinity:
408-
{{ toYaml . | indent 8 }}
421+
affinity: {{- toYaml . | nindent 8 }}
409422
{{- end }}
410423
{{- with .Values.st2web.tolerations }}
411-
tolerations:
412-
{{ toYaml . | indent 8 }}
424+
tolerations: {{- toYaml . | nindent 8 }}
413425
{{- end }}
414426

415427
---
@@ -488,17 +500,20 @@ spec:
488500
- key: datastore_crypto_key
489501
path: datastore_key.json
490502
{{- end }}
503+
{{- if .Values.dnsPolicy }}
504+
dnsPolicy: {{ .Values.dnsPolicy }}
505+
{{- end }}
506+
{{- with .Values.dnsConfig }}
507+
dnsConfig: {{- toYaml . | nindent 8 }}
508+
{{- end }}
491509
{{- with .Values.st2rulesengine.nodeSelector }}
492-
nodeSelector:
493-
{{ toYaml . | indent 8 }}
510+
nodeSelector: {{- toYaml . | nindent 8 }}
494511
{{- end }}
495512
{{- with .Values.st2rulesengine.affinity }}
496-
affinity:
497-
{{ toYaml . | indent 8 }}
513+
affinity: {{- toYaml . | nindent 8 }}
498514
{{- end }}
499515
{{- with .Values.st2rulesengine.tolerations }}
500-
tolerations:
501-
{{ toYaml . | indent 8 }}
516+
tolerations: {{- toYaml . | nindent 8 }}
502517
{{- end }}
503518

504519
---
@@ -570,17 +585,20 @@ spec:
570585
- name: st2-config-vol
571586
configMap:
572587
name: {{ .Release.Name }}-st2-config
588+
{{- if .Values.dnsPolicy }}
589+
dnsPolicy: {{ .Values.dnsPolicy }}
590+
{{- end }}
591+
{{- with .Values.dnsConfig }}
592+
dnsConfig: {{- toYaml . | nindent 8 }}
593+
{{- end }}
573594
{{- with .Values.st2timersengine.nodeSelector }}
574-
nodeSelector:
575-
{{ toYaml . | indent 8 }}
595+
nodeSelector: {{- toYaml . | nindent 8 }}
576596
{{- end }}
577597
{{- with .Values.st2timersengine.affinity }}
578-
affinity:
579-
{{ toYaml . | indent 8 }}
598+
affinity: {{- toYaml . | nindent 8 }}
580599
{{- end }}
581600
{{- with .Values.st2timersengine.tolerations }}
582-
tolerations:
583-
{{ toYaml . | indent 8 }}
601+
tolerations: {{- toYaml . | nindent 8 }}
584602
{{- end }}
585603

586604
---
@@ -665,17 +683,20 @@ spec:
665683
- key: datastore_crypto_key
666684
path: datastore_key.json
667685
{{- end }}
686+
{{- if .Values.dnsPolicy }}
687+
dnsPolicy: {{ .Values.dnsPolicy }}
688+
{{- end }}
689+
{{- with .Values.dnsConfig }}
690+
dnsConfig: {{- toYaml . | nindent 8 }}
691+
{{- end }}
668692
{{- with .Values.st2workflowengine.nodeSelector }}
669-
nodeSelector:
670-
{{ toYaml . | indent 8 }}
693+
nodeSelector: {{- toYaml . | nindent 8 }}
671694
{{- end }}
672695
{{- with .Values.st2workflowengine.affinity }}
673-
affinity:
674-
{{ toYaml . | indent 8 }}
696+
affinity: {{- toYaml . | nindent 8 }}
675697
{{- end }}
676698
{{- with .Values.st2workflowengine.tolerations }}
677-
tolerations:
678-
{{ toYaml . | indent 8 }}
699+
tolerations: {{- toYaml . | nindent 8 }}
679700
{{- end }}
680701

681702
---
@@ -759,17 +780,20 @@ spec:
759780
- name: st2-config-vol
760781
configMap:
761782
name: {{ .Release.Name }}-st2-config
783+
{{- if .Values.dnsPolicy }}
784+
dnsPolicy: {{ .Values.dnsPolicy }}
785+
{{- end }}
786+
{{- with .Values.dnsConfig }}
787+
dnsConfig: {{- toYaml . | nindent 8 }}
788+
{{- end }}
762789
{{- with .Values.st2scheduler.nodeSelector }}
763-
nodeSelector:
764-
{{ toYaml . | indent 8 }}
790+
nodeSelector: {{- toYaml . | nindent 8 }}
765791
{{- end }}
766792
{{- with .Values.st2scheduler.affinity }}
767-
affinity:
768-
{{ toYaml . | indent 8 }}
793+
affinity: {{- toYaml . | nindent 8 }}
769794
{{- end }}
770795
{{- with .Values.st2scheduler.tolerations }}
771-
tolerations:
772-
{{ toYaml . | indent 8 }}
796+
tolerations: {{- toYaml . | nindent 8 }}
773797
{{- end }}
774798

775799
---
@@ -840,17 +864,20 @@ spec:
840864
- name: st2-config-vol
841865
configMap:
842866
name: {{ .Release.Name }}-st2-config
867+
{{- if .Values.dnsPolicy }}
868+
dnsPolicy: {{ .Values.dnsPolicy }}
869+
{{- end }}
870+
{{- with .Values.dnsConfig }}
871+
dnsConfig: {{- toYaml . | nindent 8 }}
872+
{{- end }}
843873
{{- with .Values.st2notifier.nodeSelector }}
844-
nodeSelector:
845-
{{ toYaml . | indent 8 }}
874+
nodeSelector: {{- toYaml . | nindent 8 }}
846875
{{- end }}
847876
{{- with .Values.st2notifier.affinity }}
848-
affinity:
849-
{{ toYaml . | indent 8 }}
877+
affinity: {{- toYaml . | nindent 8 }}
850878
{{- end }}
851879
{{- with .Values.st2notifier.tolerations }}
852-
tolerations:
853-
{{ toYaml . | indent 8 }}
880+
tolerations: {{- toYaml . | nindent 8 }}
854881
{{- end }}
855882

856883
{{- range .Values.st2.packs.sensors }}
@@ -971,17 +998,20 @@ spec:
971998
{{- if $.Values.st2.packs.images }}
972999
{{- include "packs-volumes" $ | indent 8 }}
9731000
{{- end }}
1001+
{{- if $.Values.dnsPolicy }}
1002+
dnsPolicy: {{ $.Values.dnsPolicy }}
1003+
{{- end }}
1004+
{{- with $.Values.dnsConfig }}
1005+
dnsConfig: {{- toYaml . | nindent 8 }}
1006+
{{- end }}
9741007
{{- with .nodeSelector }}
975-
nodeSelector:
976-
{{ toYaml . | indent 8 }}
1008+
nodeSelector: {{- toYaml . | nindent 8 }}
9771009
{{- end }}
9781010
{{- with .affinity }}
979-
affinity:
980-
{{ toYaml . | indent 8 }}
1011+
affinity: {{- toYaml . | nindent 8 }}
9811012
{{- end }}
9821013
{{- with .tolerations }}
983-
tolerations:
984-
{{ toYaml . | indent 8 }}
1014+
tolerations: {{- toYaml . | nindent 8 }}
9851015
{{- end }}
9861016
{{- end }}
9871017

@@ -1101,17 +1131,20 @@ spec:
11011131
{{- if .Values.st2.packs.images }}
11021132
{{- include "packs-volumes" . | indent 8 }}
11031133
{{- end }}
1134+
{{- if .Values.dnsPolicy }}
1135+
dnsPolicy: {{ .Values.dnsPolicy }}
1136+
{{- end }}
1137+
{{- with .Values.dnsConfig }}
1138+
dnsConfig: {{- toYaml . | nindent 8 }}
1139+
{{- end }}
11041140
{{- with .Values.st2actionrunner.nodeSelector }}
1105-
nodeSelector:
1106-
{{ toYaml . | indent 8 }}
1141+
nodeSelector: {{- toYaml . | nindent 8 }}
11071142
{{- end }}
11081143
{{- with .Values.st2actionrunner.affinity }}
1109-
affinity:
1110-
{{ toYaml . | indent 8 }}
1144+
affinity: {{- toYaml . | nindent 8 }}
11111145
{{- end }}
11121146
{{- with .Values.st2actionrunner.tolerations }}
1113-
tolerations:
1114-
{{ toYaml . | indent 8 }}
1147+
tolerations: {{- toYaml . | nindent 8 }}
11151148
{{- end }}
11161149

11171150
---
@@ -1182,17 +1215,20 @@ spec:
11821215
- name: st2-config-vol
11831216
configMap:
11841217
name: {{ .Release.Name }}-st2-config
1218+
{{- if .Values.dnsPolicy }}
1219+
dnsPolicy: {{ .Values.dnsPolicy }}
1220+
{{- end }}
1221+
{{- with .Values.dnsConfig }}
1222+
dnsConfig: {{- toYaml . | nindent 8 }}
1223+
{{- end }}
11851224
{{- with .Values.st2garbagecollector.nodeSelector }}
1186-
nodeSelector:
1187-
{{ toYaml . | indent 8 }}
1225+
nodeSelector: {{- toYaml . | nindent 8 }}
11881226
{{- end }}
11891227
{{- with .Values.st2garbagecollector.affinity }}
1190-
affinity:
1191-
{{ toYaml . | indent 8 }}
1228+
affinity: {{- toYaml . | nindent 8 }}
11921229
{{- end }}
11931230
{{- with .Values.st2garbagecollector.tolerations }}
1194-
tolerations:
1195-
{{ toYaml . | indent 8 }}
1231+
tolerations: {{- toYaml . | nindent 8 }}
11961232
{{- end }}
11971233

11981234
---
@@ -1456,16 +1492,19 @@ spec:
14561492
- name: st2-chatops-hubot-scripts-vol
14571493
{{- toYaml .Values.st2chatops.hubotScriptsVolume | nindent 10 }}
14581494
{{- end }}
1495+
{{- if .Values.dnsPolicy }}
1496+
dnsPolicy: {{ .Values.dnsPolicy }}
1497+
{{- end }}
1498+
{{- with .Values.dnsConfig }}
1499+
dnsConfig: {{- toYaml . | nindent 8 }}
1500+
{{- end }}
14591501
{{- with .Values.st2chatops.nodeSelector }}
1460-
nodeSelector:
1461-
{{ toYaml . | indent 8 }}
1502+
nodeSelector: {{- toYaml . | nindent 8 }}
14621503
{{- end }}
14631504
{{- with .Values.st2chatops.affinity }}
1464-
affinity:
1465-
{{ toYaml . | indent 8 }}
1505+
affinity: {{- toYaml . | nindent 8 }}
14661506
{{- end }}
14671507
{{- with .Values.st2chatops.tolerations }}
1468-
tolerations:
1469-
{{ toYaml . | indent 8 }}
1508+
tolerations: {{- toYaml . | nindent 8 }}
14701509
{{- end }}
14711510
{{- end }}

0 commit comments

Comments
 (0)