From 93e3f265b451acd00e1bd71c09dde2b7b3c4397d Mon Sep 17 00:00:00 2001 From: Jacob Floyd Date: Fri, 12 Apr 2024 01:56:53 -0500 Subject: [PATCH] fix script in job-st2canary-for-writable-packs-volume (#411) Fixes #388 --- CHANGELOG.md | 2 +- templates/jobs.yaml | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e9d3a215..00977a67 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,7 @@ # Changelog ## Development -* Fix syntax with ensure-packs-volumes-are-writable job (#403) (by @skiedude) +* Fix syntax with ensure-packs-volumes-are-writable job (#403, #411) (by @skiedude) * Add securityContext support to custom st2packs images, extra_hooks jobs; Also fallback to st2actionrunner securityContext for misc init container jobs and pods. (#410) (by @cognifloyd) * Stop generating the DataStore Secret (#385) and checksum labels (#391) when existing secret provided or disabled (by @bmarick) * Stop generating the checksum labels for Auth Secret (#392) when existing secret provided or disabled (by @bmarick) diff --git a/templates/jobs.yaml b/templates/jobs.yaml index 0f6792ec..592936fb 100644 --- a/templates/jobs.yaml +++ b/templates/jobs.yaml @@ -532,7 +532,7 @@ spec: # readOnly: false # ephemeral volumes could also work, ... but that config is even deeper. command: - - 'sh' + - 'bash' # -e => exit on failure # -E => trap ERR is inherited in subfunctions - '-eEc' @@ -545,7 +545,7 @@ spec: INTRO function __handle_error__ { - cat <<- 'FAIL' + cat <<- ' FAIL' ERROR: One or more volumes in st2.packs.volumes (from helm values) does not meet StackStorm's shared volumes requirements! see: https://github.com/StackStorm/stackstorm-k8s#method-2-shared-volumes @@ -565,6 +565,7 @@ spec: echo done echo DONE + volumeMounts: {{- include "stackstorm-ha.packs-volume-mounts" $ | nindent 8 }} {{/* do not include the pack-configs-volume-mount helper here */}}