fix: tolerate active helm reconciles
Deploy Cluster / Terraform (push) Successful in 35s
Deploy Cluster / Ansible (push) Failing after 19m17s

This commit is contained in:
2026-05-03 06:35:43 +00:00
parent 69100bac44
commit 4197647b08
+14
View File
@@ -258,6 +258,7 @@ jobs:
local handled
local ready
local healthy
local reconciling
local generation
local observed_generation
@@ -273,9 +274,15 @@ jobs:
ready="$(kubectl -n "${namespace}" get "${resource}" -o jsonpath='{.status.conditions[?(@.type=="Ready")].status}' 2>/dev/null || true)"
healthy="$(kubectl -n "${namespace}" get "${resource}" -o jsonpath='{.status.conditions[?(@.type=="Healthy")].status}' 2>/dev/null || true)"
reconciling="$(kubectl -n "${namespace}" get "${resource}" -o jsonpath='{.status.conditions[?(@.type=="Reconciling")].status}' 2>/dev/null || true)"
generation="$(kubectl -n "${namespace}" get "${resource}" -o jsonpath='{.metadata.generation}' 2>/dev/null || true)"
observed_generation="$(kubectl -n "${namespace}" get "${resource}" -o jsonpath='{.status.observedGeneration}' 2>/dev/null || true)"
if [[ "${resource}" == helmrelease/* ]] && [ "${reconciling}" = "True" ]; then
echo "${resource} did not report reconcile ${reconcile_at}, but it is actively reconciling; continuing"
return 0
fi
if [ "${ready}" = "True" ] && [ "${observed_generation}" = "${generation}" ]; then
if [ -z "${healthy}" ] || [ "${healthy}" = "True" ]; then
echo "${resource} did not report reconcile ${reconcile_at}, but it is already Ready; continuing"
@@ -621,6 +628,7 @@ jobs:
local handled
local ready
local healthy
local reconciling
local generation
local observed_generation
@@ -636,9 +644,15 @@ jobs:
ready="$(kubectl -n "${namespace}" get "${resource}" -o jsonpath='{.status.conditions[?(@.type=="Ready")].status}' 2>/dev/null || true)"
healthy="$(kubectl -n "${namespace}" get "${resource}" -o jsonpath='{.status.conditions[?(@.type=="Healthy")].status}' 2>/dev/null || true)"
reconciling="$(kubectl -n "${namespace}" get "${resource}" -o jsonpath='{.status.conditions[?(@.type=="Reconciling")].status}' 2>/dev/null || true)"
generation="$(kubectl -n "${namespace}" get "${resource}" -o jsonpath='{.metadata.generation}' 2>/dev/null || true)"
observed_generation="$(kubectl -n "${namespace}" get "${resource}" -o jsonpath='{.status.observedGeneration}' 2>/dev/null || true)"
if [[ "${resource}" == helmrelease/* ]] && [ "${reconciling}" = "True" ]; then
echo "${resource} did not report reconcile ${reconcile_at}, but it is actively reconciling; continuing"
return 0
fi
if [ "${ready}" = "True" ] && [ "${observed_generation}" = "${generation}" ]; then
if [ -z "${healthy}" ] || [ "${healthy}" = "True" ]; then
echo "${resource} did not report reconcile ${reconcile_at}, but it is already Ready; continuing"