mirror of
https://github.com/krkn-chaos/krkn.git
synced 2026-04-06 18:57:19 +00:00
* pod monitoring integration in plugin scenario Signed-off-by: Tullio Sebastiani <tsebasti@redhat.com> * pod monitoring integration in container scenario Signed-off-by: Tullio Sebastiani <tsebasti@redhat.com> * removed wait-for-pod step from plugin scenario config files Signed-off-by: Tullio Sebastiani <tsebasti@redhat.com> * introduced global pod recovery time Signed-off-by: Tullio Sebastiani <tsebasti@redhat.com> nit Signed-off-by: Tullio Sebastiani <tsebasti@redhat.com> * introduced krkn_pod_recovery_time in plugin scenario and removed all the references to wait-for-pods Signed-off-by: Tullio Sebastiani <tsebasti@redhat.com> fix Signed-off-by: Tullio Sebastiani <tsebasti@redhat.com> * functional test fix Signed-off-by: Tullio Sebastiani <tsebasti@redhat.com> * main branch functional test fix Signed-off-by: Tullio Sebastiani <tsebasti@redhat.com> * increased recovery times Signed-off-by: Tullio Sebastiani <tsebasti@redhat.com> --------- Signed-off-by: Tullio Sebastiani <tsebasti@redhat.com>
27 lines
534 B
Bash
27 lines
534 B
Bash
ERRORED=false
|
|
|
|
function finish {
|
|
if [ $? != 0 ] && [ $ERRORED != "true" ]
|
|
then
|
|
error
|
|
fi
|
|
}
|
|
|
|
function error {
|
|
exit_code=$?
|
|
if [ $exit_code == 1 ]
|
|
then
|
|
echo "Error caught."
|
|
ERRORED=true
|
|
elif [ $exit_code == 2 ]
|
|
then
|
|
echo "Run with exit code 2 detected, it is expected, wrapping the exit code with 0 to avoid pipeline failure"
|
|
exit 0
|
|
fi
|
|
}
|
|
|
|
function get_node {
|
|
worker_node=$(kubectl get nodes --no-headers | grep worker | head -n 1)
|
|
export WORKER_NODE=$worker_node
|
|
}
|