@@ -516,7 +516,6 @@ spec:
516516 containers :
517517 - name : st2canary-for-writable-packs-volumes
518518 image : ' {{ template "stackstorm-ha.imageRepository" $ }}/st2actionrunner:{{ tpl $.Values.image.tag $ }}'
519- # image: busybox:1.28
520519 imagePullPolicy : {{ $.Values.image.pullPolicy }}
521520 {{- with $.Values.securityContext }}
522521 securityContext : {{- toYaml . | nindent 10 }}
@@ -532,25 +531,19 @@ spec:
532531 - ' sh'
533532 - ' -ec'
534533 - |
535- echo Testing write permissions for packs volumes.
536- echo If this passes, the pod will automatically be deleted.
537- echo If this fails, inspect the pod for errors in kubernetes,
538- echo and then delete this st2canary pod manually.
539- echo
540- echo Testing write permissions on packs volume...
541- touch /opt/stackstorm/packs/.write-test
542- rm /opt/stackstorm/packs/.write-test
543- echo
544- echo Testing write permissions on virtualenvs volume...
545- touch /opt/stackstorm/virtualenvs/.write-test
546- rm /opt/stackstorm/virtualenvs/.write-test
547- echo
548- {{- if $.Values.st2.packs.volumes.configs }}
549- echo Testing write permissions on configs volume...
550- touch /opt/stackstorm/configs/.write-test
551- rm /opt/stackstorm/configs/.write-test
552- echo
553- {{- end }}
534+ cat << 'INTRO'
535+ Testing write permissions for packs volumes.
536+ If this passes, the pod will automatically be deleted.
537+ If this fails, inspect the pod for errors in kubernetes,
538+ and then delete this st2canary pod manually.
539+ INTRO
540+
541+ for volume in packs virtualenvs {{ if $.Values.st2.packs.volumes.configs }}configs{{ end }}; do
542+ echo Testing write permissions on ${volume} volume...
543+ touch /opt/stackstorm/${volume}/.write-test
544+ rm /opt/stackstorm/${volume}/.write-test
545+ echo
546+ done
554547 echo DONE
555548 volumeMounts :
556549 {{- include "stackstorm-ha.packs-volume-mounts" $ | nindent 8 }}
0 commit comments