fix: retry observability oci chart fetches
This commit is contained in:
@@ -967,8 +967,12 @@ jobs:
|
|||||||
wait_for_ocirepository_ready_or_cached() {
|
wait_for_ocirepository_ready_or_cached() {
|
||||||
local repository="$1"
|
local repository="$1"
|
||||||
local timeout="$2"
|
local timeout="$2"
|
||||||
|
local attempts="${3:-6}"
|
||||||
local artifact_storage
|
local artifact_storage
|
||||||
|
local attempt
|
||||||
|
|
||||||
|
for attempt in $(seq 1 "${attempts}"); do
|
||||||
|
reconcile_flux_resource "ocirepository/${repository}" 300
|
||||||
if kubectl -n flux-system wait --for=condition=Ready "ocirepository/${repository}" --timeout="${timeout}"; then
|
if kubectl -n flux-system wait --for=condition=Ready "ocirepository/${repository}" --timeout="${timeout}"; then
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
@@ -979,6 +983,9 @@ jobs:
|
|||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo "OCIRepository ${repository} did not become Ready after ${timeout}; forcing retry (${attempt}/${attempts})" >&2
|
||||||
|
done
|
||||||
|
|
||||||
observability_diagnostics
|
observability_diagnostics
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ metadata:
|
|||||||
namespace: flux-system
|
namespace: flux-system
|
||||||
spec:
|
spec:
|
||||||
interval: 10m
|
interval: 10m
|
||||||
|
timeout: 5m
|
||||||
url: oci://ghcr.io/grafana/helm-charts/loki
|
url: oci://ghcr.io/grafana/helm-charts/loki
|
||||||
ref:
|
ref:
|
||||||
tag: 6.46.0
|
tag: 6.46.0
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ metadata:
|
|||||||
namespace: flux-system
|
namespace: flux-system
|
||||||
spec:
|
spec:
|
||||||
interval: 10m
|
interval: 10m
|
||||||
|
timeout: 5m
|
||||||
url: oci://ghcr.io/grafana/helm-charts/promtail
|
url: oci://ghcr.io/grafana/helm-charts/promtail
|
||||||
ref:
|
ref:
|
||||||
tag: 6.16.6
|
tag: 6.16.6
|
||||||
|
|||||||
Reference in New Issue
Block a user