From cd88418ef4fbdb71df0890deded8101c8208f837 Mon Sep 17 00:00:00 2001 From: Neil Hanlon Date: Thu, 6 Apr 2023 21:14:13 -0400 Subject: [PATCH] fix: preCommand and postCommand injected improperly these need to be strings we pass as a single object to bash -c, rather than multiple discrete commands. --- deploy/apollo/apollo-rhworker/templates/cronjob.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/deploy/apollo/apollo-rhworker/templates/cronjob.yaml b/deploy/apollo/apollo-rhworker/templates/cronjob.yaml index 52dfc41..6027f1c 100644 --- a/deploy/apollo/apollo-rhworker/templates/cronjob.yaml +++ b/deploy/apollo/apollo-rhworker/templates/cronjob.yaml @@ -31,11 +31,12 @@ spec: imagePullPolicy: IfNotPresent command: ["/bin/bash", "-c"] args: + - | {{- range $cmd := $.Values.cron.preCommand }} - - {{ $cmd }} + {{ $cmd }} {{- end }} - - tctl wf run --tq v2-rhworker --wt PollRHAdvisoriesWorkflow + tctl wf run --tq v2-rhworker --wt PollRHAdvisoriesWorkflow {{- range $cmd := $.Values.cron.postCommand }} - - {{ $cmd }} + {{ $cmd }} {{- end }} {{- end }}