mirror of
https://github.com/auricom/home-cluster.git
synced 2025-09-17 18:24:14 +02:00
15 lines
342 B
Bash
Executable File
15 lines
342 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
JOB=$1
|
|
NAMESPACE="${2:-default}"
|
|
CLUSTER="${3:-main}"
|
|
|
|
[[ -z "${JOB}" ]] && echo "Job name not specified" && exit 1
|
|
while true; do
|
|
STATUS="$(kubectl -n "${NAMESPACE}" get pod -l job-name="${JOB}" -o jsonpath='{.items[*].status.phase}')"
|
|
if [ "${STATUS}" == "Pending" ]; then
|
|
break
|
|
fi
|
|
sleep 1
|
|
done
|