Introduce a readiness endpoint that tracks metric stabilization - #46
Open
mraerino wants to merge 4 commits into
Open
Introduce a readiness endpoint that tracks metric stabilization#46mraerino wants to merge 4 commits into
mraerino wants to merge 4 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
Adds an HTTP readiness endpoint intended for Kubernetes readiness probes, so a new pod can be held “not ready” until the VictoriaMetrics push-based (converge) metric pipelines have stabilized.
Changes:
- Introduces
readinessTrackerand a/readyJSON endpoint that returns 200 only after required components have stabilized. - Wires converge runners to notify readiness once stabilization occurs.
- Enables an optional Helm
readinessProbe(default enabled) that probesGET /ready, and adds a basic HTTP test for the new endpoint.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/basic_tests.yml | Adds a basic HTTP check for /ready. |
| readiness.go | Implements readiness tracking and an HTTP handler emitting JSON readiness state. |
| readiness_test.go | Unit tests for readiness tracking stickiness/idempotency. |
| main.go | Instantiates readiness tracker, exposes /ready, and passes tracker into converge setup. |
| converge.go | Adds a stability notifier into converge setup and forwards it to converge.Run. |
| charts/cloudflare-exporter/values.yaml | Adds configurable readinessProbe values and docs. |
| charts/cloudflare-exporter/templates/deployment.yaml | Conditionally renders a container readinessProbe for /ready. |
| charts/cloudflare-exporter/Chart.yaml | Bumps chart version to 0.2.3. |
Suppressed comments (1)
main.go:288
- The TODO comment here becomes unnecessary (and the current "todo" prefix may be flagged by comment/style linters). If readiness gating is driven solely by whether vm_push_endpoint is configured, this can be expressed without the TODO block.
// todo: this is a bad way to check for intended push failure
// ideally converge setup wouldn't be attempted with this option empty
if viper.GetString(argVMPushEndpoint) != "" {
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
sprsquish
approved these changes
Aug 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
ref https://linear.app/supabase/issue/NET-510/cloudflare-exporter-delay-new-pod-readiness-until-metrics-stabilize
Adds a readiness HTTP endpoint that can be used in a readiness probe to keep the old pod around until the new pod has stabilized its push metrics