fix: allow cached OCI chart artifacts
This commit is contained in:
@@ -617,10 +617,10 @@ jobs:
|
|||||||
local oci_timeout="$4"
|
local oci_timeout="$4"
|
||||||
local release_timeout="$5"
|
local release_timeout="$5"
|
||||||
local reconcile_at
|
local reconcile_at
|
||||||
|
local artifact_storage
|
||||||
|
|
||||||
wait_for_resource flux-system "ocirepository.source.toolkit.fluxcd.io/${oci_name}" 600
|
wait_for_resource flux-system "ocirepository.source.toolkit.fluxcd.io/${oci_name}" 600
|
||||||
reconcile_at="$(date +%s)"
|
reconcile_at="$(date +%s)"
|
||||||
kubectl -n flux-system annotate "ocirepository/${oci_name}" reconcile.fluxcd.io/requestedAt="${reconcile_at}" --overwrite
|
|
||||||
kubectl -n flux-system annotate "helmrelease/${release_name}" \
|
kubectl -n flux-system annotate "helmrelease/${release_name}" \
|
||||||
reconcile.fluxcd.io/requestedAt="${reconcile_at}" \
|
reconcile.fluxcd.io/requestedAt="${reconcile_at}" \
|
||||||
reconcile.fluxcd.io/resetAt="${reconcile_at}" \
|
reconcile.fluxcd.io/resetAt="${reconcile_at}" \
|
||||||
@@ -628,9 +628,14 @@ jobs:
|
|||||||
--overwrite
|
--overwrite
|
||||||
|
|
||||||
if ! kubectl -n flux-system wait --for=condition=Ready "ocirepository/${oci_name}" --timeout="${oci_timeout}"; then
|
if ! kubectl -n flux-system wait --for=condition=Ready "ocirepository/${oci_name}" --timeout="${oci_timeout}"; then
|
||||||
|
artifact_storage="$(kubectl -n flux-system get "ocirepository/${oci_name}" -o jsonpath='{.status.conditions[?(@.type=="ArtifactInStorage")].status}' 2>/dev/null || true)"
|
||||||
|
if [ "${artifact_storage}" = "True" ]; then
|
||||||
|
echo "OCIRepository ${oci_name} is not currently Ready; continuing with cached artifact" >&2
|
||||||
|
else
|
||||||
eso_diagnostics
|
eso_diagnostics
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
wait_for_helmrelease_ready "${release_name}" "${target_namespace}" "${release_timeout}"
|
wait_for_helmrelease_ready "${release_name}" "${target_namespace}" "${release_timeout}"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user