fix: stop waiting for vendored observability oci sources
This commit is contained in:
@@ -980,8 +980,6 @@ jobs:
|
|||||||
kubectl describe clustersecretstore/doppler-hetznerterra || true
|
kubectl describe clustersecretstore/doppler-hetznerterra || true
|
||||||
kubectl -n observability describe externalsecret/grafana-admin || true
|
kubectl -n observability describe externalsecret/grafana-admin || true
|
||||||
kubectl -n observability get secret/grafana-admin-credentials || true
|
kubectl -n observability get secret/grafana-admin-credentials || true
|
||||||
kubectl -n flux-system describe ocirepository/loki || true
|
|
||||||
kubectl -n flux-system describe ocirepository/promtail || true
|
|
||||||
kubectl -n flux-system describe helmrelease/kube-prometheus-stack || true
|
kubectl -n flux-system describe helmrelease/kube-prometheus-stack || true
|
||||||
kubectl -n flux-system describe helmrelease/loki || true
|
kubectl -n flux-system describe helmrelease/loki || true
|
||||||
kubectl -n flux-system describe helmrelease/promtail || true
|
kubectl -n flux-system describe helmrelease/promtail || true
|
||||||
@@ -1087,56 +1085,6 @@ jobs:
|
|||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
wait_for_ocirepository_ready_or_cached() {
|
|
||||||
local repository="$1"
|
|
||||||
local timeout="$2"
|
|
||||||
local attempts="${3:-3}"
|
|
||||||
local artifact_storage
|
|
||||||
local attempt
|
|
||||||
local ready
|
|
||||||
|
|
||||||
for attempt in $(seq 1 "${attempts}"); do
|
|
||||||
if ! kubectl get --raw=/readyz --request-timeout=10s >/dev/null 2>&1; then
|
|
||||||
echo "Kubernetes API is not ready while waiting for OCIRepository ${repository}; failing fast" >&2
|
|
||||||
kubectl -n kube-system get pods -o wide || true
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
ready="$(kubectl -n flux-system get "ocirepository/${repository}" -o jsonpath='{.status.conditions[?(@.type=="Ready")].status}' 2>/dev/null || true)"
|
|
||||||
if [ "${ready}" = "True" ]; then
|
|
||||||
return 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
artifact_storage="$(kubectl -n flux-system get "ocirepository/${repository}" -o jsonpath='{.status.conditions[?(@.type=="ArtifactInStorage")].status}' 2>/dev/null || true)"
|
|
||||||
if [ "${artifact_storage}" = "True" ]; then
|
|
||||||
echo "OCIRepository ${repository} is not currently Ready; continuing with cached artifact" >&2
|
|
||||||
return 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
reconcile_flux_resource "ocirepository/${repository}" 120
|
|
||||||
if kubectl -n flux-system wait --for=condition=Ready "ocirepository/${repository}" --timeout="${timeout}"; then
|
|
||||||
return 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
if ! kubectl get --raw=/readyz --request-timeout=10s >/dev/null 2>&1; then
|
|
||||||
echo "Kubernetes API became unavailable while waiting for OCIRepository ${repository}; failing fast" >&2
|
|
||||||
kubectl -n kube-system get pods -o wide || true
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
artifact_storage="$(kubectl -n flux-system get "ocirepository/${repository}" -o jsonpath='{.status.conditions[?(@.type=="ArtifactInStorage")].status}' 2>/dev/null || true)"
|
|
||||||
if [ "${artifact_storage}" = "True" ]; then
|
|
||||||
echo "OCIRepository ${repository} is not currently Ready; continuing with cached artifact" >&2
|
|
||||||
return 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "OCIRepository ${repository} did not become Ready after ${timeout}; forcing retry (${attempt}/${attempts})" >&2
|
|
||||||
done
|
|
||||||
|
|
||||||
observability_diagnostics
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
wait_for_helmrelease_ready() {
|
wait_for_helmrelease_ready() {
|
||||||
local release="$1"
|
local release="$1"
|
||||||
local timeout_seconds="$2"
|
local timeout_seconds="$2"
|
||||||
@@ -1178,10 +1126,6 @@ jobs:
|
|||||||
wait_for_resource flux-system kustomization.kustomize.toolkit.fluxcd.io/addon-observability 600
|
wait_for_resource flux-system kustomization.kustomize.toolkit.fluxcd.io/addon-observability 600
|
||||||
reconcile_flux_resource kustomization/addon-observability 600
|
reconcile_flux_resource kustomization/addon-observability 600
|
||||||
wait_for_flux_ready kustomization/addon-observability 300s
|
wait_for_flux_ready kustomization/addon-observability 300s
|
||||||
wait_for_resource flux-system ocirepository.source.toolkit.fluxcd.io/loki 300
|
|
||||||
wait_for_resource flux-system ocirepository.source.toolkit.fluxcd.io/promtail 300
|
|
||||||
wait_for_ocirepository_ready_or_cached loki 90s 3
|
|
||||||
wait_for_ocirepository_ready_or_cached promtail 90s 3
|
|
||||||
for release in kube-prometheus-stack loki promtail; do
|
for release in kube-prometheus-stack loki promtail; do
|
||||||
wait_for_resource flux-system "helmrelease.helm.toolkit.fluxcd.io/${release}" 300
|
wait_for_resource flux-system "helmrelease.helm.toolkit.fluxcd.io/${release}" 300
|
||||||
request_helmrelease_reconcile "${release}"
|
request_helmrelease_reconcile "${release}"
|
||||||
|
|||||||
Reference in New Issue
Block a user