Post

Harbor Exporter Readiness Now Independent of Scan Collection

Harbor Exporter Readiness Now Independent of Scan Collection

I documented the recent fix that decouples the Harbor exporter readiness probe from scan collection, improving reliability and reducing unnecessary restarts.

Readiness Probe Updated to Use /livez for Fresh Metrics

The startup, liveness, and readiness probes now all check /livez, which only verifies the local HTTP server. A cold inventory or unavailable Harbor API can leave the metrics cache stale while the server appears healthy. By requiring a fresh inventory for readiness, Argo can advance Harbor’s sync without being blocked by stale metrics.

Exporter Restart Stability Improved

Previously a one‑second liveness timeout would restart the exporter twice under load, discarding its metrics cache and causing intermittent failures. The new design lets the exporter keep its cache across restarts, reducing the number of restarts and the associated metric loss.

Impact on Platform Observability

Prometheus still scrapes /metrics, which returns HTTP 503 and omits project totals while the cache is missing or expired. With a fresh inventory required for readiness, the metrics become stable and accurate, preventing false alerts and ensuring reliable dashboards.

Design Transfer to Other Stateful Services

This pattern—decoupling readiness from background collection and using a simple health endpoint—can be applied to other stateful services in the homelab. Aligning readiness with /livez or similar probes helps avoid cascading restarts and keeps observability data consistent during scaling events.

This post is licensed under CC BY 4.0 by the author.