From 73e6a2050385c04e5f7a2d721e02b108e7cec107 Mon Sep 17 00:00:00 2001 From: Simon Larsen Date: Thu, 25 Apr 2024 12:33:58 +0100 Subject: [PATCH] Refactor e2e-cron.yml to include common environment variables and change restart policy --- .../Public/oneuptime/templates/e2e-cron.yml | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/HelmChart/Public/oneuptime/templates/e2e-cron.yml b/HelmChart/Public/oneuptime/templates/e2e-cron.yml index 6962298d29..84a41d176c 100644 --- a/HelmChart/Public/oneuptime/templates/e2e-cron.yml +++ b/HelmChart/Public/oneuptime/templates/e2e-cron.yml @@ -16,18 +16,5 @@ spec: - name: e2e-cron image: {{ printf "%s/%s/%s:%s" $.Values.image.registry $.Values.image.repository "e2e" $.Values.image.tag }} env: - - name: BASE_URL - value: {{ $.Release.Namespace }} - command: - - /bin/bash - - -c - - | - for pod in $(kubectl get pods -n $namespace --field-selector=status.phase==Failed -o jsonpath="{.items[*].metadata.name}") - do - if kubectl describe pod $pod -n $namespace | grep -q 'CrashLoopBackOff' - then - kubectl delete pod $pod -n $namespace - fi - done - - restartPolicy: OnFailure \ No newline at end of file + {{- include "oneuptime.env.common" . | nindent 14 }} + restartPolicy: Never \ No newline at end of file