Confir what argo is watching
This commit is contained in:
parent
005a3c4b84
commit
6277dfb5d2
10
jeannie
10
jeannie
|
|
@ -3656,6 +3656,16 @@ wait_for_cluster_resource() {
|
|||
local app="$3"
|
||||
local timeout_seconds="$4"
|
||||
local elapsed=0
|
||||
local api_resource
|
||||
|
||||
api_resource="${kind%%/*}"
|
||||
if ! kubectl --kubeconfig "${KUBECONFIG}" get crd "${api_resource}" >/dev/null 2>&1; then
|
||||
echo "Required CRD ${api_resource} is not installed; cannot wait for ${kind}/${name} from Argo CD app ${app}." >&2
|
||||
kubectl --kubeconfig "${KUBECONFIG}" -n argocd get application "${app}" \
|
||||
-o jsonpath='sync={.status.sync.status} health={.status.health.status} message={.status.operationState.message}{"\n"}' 2>/dev/null || true
|
||||
dump_argocd_debug "${app}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
until kubectl --kubeconfig "${KUBECONFIG}" get "${kind}/${name}" >/dev/null 2>&1; do
|
||||
if ((elapsed >= timeout_seconds)); then
|
||||
|
|
|
|||
Loading…
Reference in New Issue