mirror of
https://github.com/OneUptime/oneuptime
synced 2024-11-21 22:59:07 +00:00
Refactor e2e-cron.yml to include common environment variables and change restart policy
This commit is contained in:
parent
ef0dc5305a
commit
73e6a20503
@ -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
|
||||
{{- include "oneuptime.env.common" . | nindent 14 }}
|
||||
restartPolicy: Never
|
Loading…
Reference in New Issue
Block a user