From 4197647b08d946c6f50bb310de772fe3fe77a51b Mon Sep 17 00:00:00 2001 From: MichaelFisher1997 Date: Sun, 3 May 2026 06:35:43 +0000 Subject: [PATCH] fix: tolerate active helm reconciles --- .gitea/workflows/deploy.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index 5ccd1b6..5f70379 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -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"