Repository navigation
Conversation
Persist the first observed Ready transition on SDK resources and claims, and export it as a timestamp gauge that survives controller restarts and readiness changes.
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.
Achilles exports current readiness but does not retain when a resource first became ready. Add
achilles_resource_first_ready_timestamp_seconds, enabled by default for FSM resources and claims, and persist the timestamp ininfrared.reddit.com/first-ready-atso it survives controller restarts and later readiness changes.How it works
Both reconcilers share timestamp tracking based on persisted
Ready=Trueconditions for the current generation. Metadata patches use optimistic locking, and the gauge is published only after persistence succeeds.flowchart LR R[Persisted Ready condition] --> A[Store first-ready-at once] A --> M[Export timestamp gauge] S[Existing annotation after restart] --> MExisting resources are seeded from their current Ready transition as a best-effort historical estimate. Stored timestamps remain stable while resources are unready, suspended, or terminating; deleted objects lose their metric series, and replacements start fresh.
AchillesResourceFirstReadyin the shared recorder's disable options disables both tracking and export. No CRD schema changes are required.Validated with
make generate,make test(race enabled), andmake lintusing Go 1.24.11. Regression coverage includes status and annotation write failures, conflicts, restart recovery, readiness changes, deletion, and recreation.