Skip to content

Commit 2dd6aba

Browse files
committed
drop .Values.st2canary
1 parent e2a8341 commit 2dd6aba

File tree

5 files changed

+15
-39
lines changed

5 files changed

+15
-39
lines changed

templates/jobs.yaml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -495,17 +495,17 @@ metadata:
495495
helm.sh/hook: pre-install, pre-upgrade, pre-rollback
496496
helm.sh/hook-weight: "-5" # fairly high priority
497497
helm.sh/hook-delete-policy: hook-succeeded
498-
{{- if $.Values.st2canary.annotations }}
499-
{{- toYaml $.Values.st2canary.annotations | nindent 4 }}
498+
{{- if $.Values.jobs.annotations }}
499+
{{- toYaml $.Values.jobs.annotations | nindent 4 }}
500500
{{- end }}
501501
spec:
502502
template:
503503
metadata:
504504
name: job-st2canary-for-writable-packs-volumes
505505
labels: {{- include "stackstorm-ha.labels" (list $ "st2canary") | nindent 8 }}
506506
annotations:
507-
{{- if $.Values.st2canary.annotations }}
508-
{{- toYaml $.Values.st2canary.annotations | nindent 8 }}
507+
{{- if $.Values.jobs.annotations }}
508+
{{- toYaml $.Values.jobs.annotations | nindent 8 }}
509509
{{- end }}
510510
spec:
511511
imagePullSecrets:
@@ -567,22 +567,22 @@ spec:
567567
- name: st2-pack-configs-vol
568568
mountPath: /opt/stackstorm/configs/
569569
readOnly: false
570-
{{- range $.Values.st2canary.extra_volumes }}
571-
- name: {{ required "Each volume must have a 'name' in st2canary.extra_volumes" .name }}
572-
{{- tpl (required "Each volume must have a 'mount' definition in st2canary.extra_volumes" .mount | toYaml) $ | nindent 10 }}
570+
{{- range $.Values.jobs.extra_volumes }}
571+
- name: {{ required "Each volume must have a 'name' in jobs.extra_volumes" .name }}
572+
{{- tpl (required "Each volume must have a 'mount' definition in jobs.extra_volumes" .mount | toYaml) $ | nindent 10 }}
573573
{{- end }}
574574
resources:
575-
{{- toYaml $.Values.st2canary.resources | nindent 10 }}
575+
{{- toYaml $.Values.jobs.resources | nindent 10 }}
576576
volumes:
577577
{{- include "stackstorm-ha.packs-volumes" $ | nindent 8 }}
578578
{{- if $.Values.st2.packs.volumes.configs }}
579579
{{/* do not include the pack-configs-volume helper here */}}
580580
- name: st2-pack-configs-vol
581581
{{- toYaml $.Values.st2.packs.volumes.configs | nindent 10 }}
582582
{{- end }}
583-
{{- range $.Values.st2canary.extra_volumes }}
584-
- name: {{ required "Each volume must have a 'name' in st2canary.extra_volumes" .name }}
585-
{{- tpl (required "Each volume must have a 'volume' definition in st2canary.extra_volumes" .volume | toYaml) $ | nindent 10 }}
583+
{{- range $.Values.jobs.extra_volumes }}
584+
- name: {{ required "Each volume must have a 'name' in jobs.extra_volumes" .name }}
585+
{{- tpl (required "Each volume must have a 'volume' definition in jobs.extra_volumes" .volume | toYaml) $ | nindent 10 }}
586586
{{- end }}
587587
{{- if $.Values.dnsPolicy }}
588588
dnsPolicy: {{ $.Values.dnsPolicy }}
@@ -593,13 +593,13 @@ spec:
593593
{{- with $.Values.podSecurityContext }}
594594
securityContext: {{- toYaml . | nindent 8 }}
595595
{{- end }}
596-
{{- with $.Values.st2canary.nodeSelector }}
596+
{{- with $.Values.jobs.nodeSelector }}
597597
nodeSelector: {{- toYaml . | nindent 8 }}
598598
{{- end }}
599-
{{- with $.Values.st2canary.affinity }}
599+
{{- with $.Values.jobs.affinity }}
600600
affinity: {{- toYaml . | nindent 8 }}
601601
{{- end }}
602-
{{- with $.Values.st2canary.tolerations }}
602+
{{- with $.Values.jobs.tolerations }}
603603
tolerations: {{- toYaml . | nindent 8 }}
604604
{{- end }}
605605
{{- end }}

tests/unit/custom_annotations_test.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -168,10 +168,6 @@ tests:
168168
server: "10.12.34.56"
169169
path: /var/nfsshare/configs
170170
configs: {} # has one core.yaml config file by default (dicts get merged)
171-
st2canary:
172-
annotations:
173-
foo: bar
174-
answer: "42"
175171
jobs:
176172
annotations:
177173
foo: bar

tests/unit/placement_test.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -187,10 +187,6 @@ tests:
187187
tolerations: *custom_tolerations
188188
affinity: *custom_affinity
189189
extra_hooks: *jobs_extra_hooks
190-
st2canary:
191-
nodeSelector: *custom_nodeSelector
192-
tolerations: *custom_tolerations
193-
affinity: *custom_affinity
194190
asserts:
195191
- equal:
196192
path: spec.template.spec.nodeSelector

tests/unit/resources_test.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,10 +176,9 @@ tests:
176176
images: []
177177
volumes: *volumes_enabled
178178
configs: {} # has one core.yaml config file by default (dicts get merged)
179-
st2canary:
180-
resources: *custom_resources
181179
# Only the st2canary job has resources, so disable the other jobs to narrow the test.
182180
jobs:
181+
resources: *custom_resources
183182
skip:
184183
- apply_rbac_definitions
185184
- apikey_load

values.yaml

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -968,21 +968,6 @@ jobs:
968968
# - --tail
969969
# - custom_pack.warn_about_upgrade
970970

971-
# st2canary has settings used for temporary chart hook resources
972-
# like a pod that validates packs.volumes before installs/upgrades.
973-
st2canary:
974-
annotations: {}
975-
resources: {}
976-
# Additional advanced settings to control pod/deployment placement
977-
nodeSelector: {}
978-
tolerations: []
979-
affinity: {}
980-
# mount extra volumes on the st2canary pod(s) (primarily useful to test
981-
# extra_volumes used for any of the other deployments)
982-
## Note that Helm templating is supported in 'mount' and 'volume'
983-
extra_volumes: []
984-
# see examples under st2actionrunner.extra_volumes
985-
986971
##
987972
## MongoDB HA configuration (3rd party chart dependency)
988973
##

0 commit comments

Comments
 (0)