Skip to content

Commit

Permalink
drop .Values.st2canary
Browse files Browse the repository at this point in the history
  • Loading branch information
copart-jafloyd committed Feb 3, 2023
1 parent e2a8341 commit 80d8ddb
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 39 deletions.
28 changes: 14 additions & 14 deletions templates/jobs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -495,17 +495,17 @@ metadata:
helm.sh/hook: pre-install, pre-upgrade, pre-rollback
helm.sh/hook-weight: "-5" # fairly high priority
helm.sh/hook-delete-policy: hook-succeeded
{{- if $.Values.st2canary.annotations }}
{{- toYaml $.Values.st2canary.annotations | nindent 4 }}
{{- if $.Values.jobs.annotations }}
{{- toYaml $.Values.jobs.annotations | nindent 4 }}
{{- end }}
spec:
template:
metadata:
name: job-st2canary-for-writable-packs-volumes
labels: {{- include "stackstorm-ha.labels" (list $ "st2canary") | nindent 8 }}
annotations:
{{- if $.Values.st2canary.annotations }}
{{- toYaml $.Values.st2canary.annotations | nindent 8 }}
{{- if $.Values.jobs.annotations }}
{{- toYaml $.Values.jobs.annotations | nindent 8 }}
{{- end }}
spec:
imagePullSecrets:
Expand Down Expand Up @@ -567,22 +567,22 @@ spec:
- name: st2-pack-configs-vol
mountPath: /opt/stackstorm/configs/
readOnly: false
{{- range $.Values.st2canary.extra_volumes }}
- name: {{ required "Each volume must have a 'name' in st2canary.extra_volumes" .name }}
{{- tpl (required "Each volume must have a 'mount' definition in st2canary.extra_volumes" .mount | toYaml) $ | nindent 10 }}
{{- range $.Values.jobs.extra_volumes }}
- name: {{ required "Each volume must have a 'name' in jobs.extra_volumes" .name }}
{{- tpl (required "Each volume must have a 'mount' definition in jobs.extra_volumes" .mount | toYaml) $ | nindent 10 }}
{{- end }}
resources:
{{- toYaml $.Values.st2canary.resources | nindent 10 }}
{{- toYaml $.Values.jobs.resources | nindent 10 }}
volumes:
{{- include "stackstorm-ha.packs-volumes" $ | nindent 8 }}
{{- if $.Values.st2.packs.volumes.configs }}
{{/* do not include the pack-configs-volume helper here */}}
- name: st2-pack-configs-vol
{{- toYaml $.Values.st2.packs.volumes.configs | nindent 10 }}
{{- end }}
{{- range $.Values.st2canary.extra_volumes }}
- name: {{ required "Each volume must have a 'name' in st2canary.extra_volumes" .name }}
{{- tpl (required "Each volume must have a 'volume' definition in st2canary.extra_volumes" .volume | toYaml) $ | nindent 10 }}
{{- range $.Values.jobs.extra_volumes }}
- name: {{ required "Each volume must have a 'name' in jobs.extra_volumes" .name }}
{{- tpl (required "Each volume must have a 'volume' definition in jobs.extra_volumes" .volume | toYaml) $ | nindent 10 }}
{{- end }}
{{- if $.Values.dnsPolicy }}
dnsPolicy: {{ $.Values.dnsPolicy }}
Expand All @@ -593,13 +593,13 @@ spec:
{{- with $.Values.podSecurityContext }}
securityContext: {{- toYaml . | nindent 8 }}
{{- end }}
{{- with $.Values.st2canary.nodeSelector }}
{{- with $.Values.jobs.nodeSelector }}
nodeSelector: {{- toYaml . | nindent 8 }}
{{- end }}
{{- with $.Values.st2canary.affinity }}
{{- with $.Values.jobs.affinity }}
affinity: {{- toYaml . | nindent 8 }}
{{- end }}
{{- with $.Values.st2canary.tolerations }}
{{- with $.Values.jobs.tolerations }}
tolerations: {{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
Expand Down
4 changes: 0 additions & 4 deletions tests/unit/custom_annotations_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -168,10 +168,6 @@ tests:
server: "10.12.34.56"
path: /var/nfsshare/configs
configs: {} # has one core.yaml config file by default (dicts get merged)
st2canary:
annotations:
foo: bar
answer: "42"
jobs:
annotations:
foo: bar
Expand Down
4 changes: 0 additions & 4 deletions tests/unit/placement_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -187,10 +187,6 @@ tests:
tolerations: *custom_tolerations
affinity: *custom_affinity
extra_hooks: *jobs_extra_hooks
st2canary:
nodeSelector: *custom_nodeSelector
tolerations: *custom_tolerations
affinity: *custom_affinity
asserts:
- equal:
path: spec.template.spec.nodeSelector
Expand Down
3 changes: 1 addition & 2 deletions tests/unit/resources_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,9 @@ tests:
images: []
volumes: *volumes_enabled
configs: {} # has one core.yaml config file by default (dicts get merged)
st2canary:
resources: *custom_resources
# Only the st2canary job has resources, so disable the other jobs to narrow the test.
jobs:
resources: *custom_resources
skip:
- apply_rbac_definitions
- apikey_load
Expand Down
15 changes: 0 additions & 15 deletions values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -968,21 +968,6 @@ jobs:
# - --tail
# - custom_pack.warn_about_upgrade

# st2canary has settings used for temporary chart hook resources
# like a pod that validates packs.volumes before installs/upgrades.
st2canary:
annotations: {}
resources: {}
# Additional advanced settings to control pod/deployment placement
nodeSelector: {}
tolerations: []
affinity: {}
# mount extra volumes on the st2canary pod(s) (primarily useful to test
# extra_volumes used for any of the other deployments)
## Note that Helm templating is supported in 'mount' and 'volume'
extra_volumes: []
# see examples under st2actionrunner.extra_volumes

##
## MongoDB HA configuration (3rd party chart dependency)
##
Expand Down

0 comments on commit 80d8ddb

Please sign in to comment.