fix: tolerate active helm reconciles
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user