feat(agent): node condition reporting — patch Node with ReaperReady condition#30
Merged
miguelgila merged 1 commit intomainfrom Mar 6, 2026
Merged
feat(agent): node condition reporting — patch Node with ReaperReady condition#30miguelgila merged 1 commit intomainfrom
miguelgila merged 1 commit intomainfrom
Conversation
…ondition The reaper-agent now periodically patches the Node object's status conditions with a ReaperReady condition that reflects the health of Reaper binaries and state directory on the node. Uses strategic merge patch on the /status subresource to upsert the condition by type. - New node_condition module with configurable interval (default 30s) - NODE_NAME set via downward API (spec.nodeName) - RBAC: nodes (get) and nodes/status (patch) - Prometheus metrics: node_condition_updates_total, node_condition_healthy - Integration tests: condition set, health reflection, metrics - Can be disabled via --node-condition-enabled=false Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #30 +/- ##
==========================================
- Coverage 86.83% 84.21% -2.63%
==========================================
Files 6 6
Lines 319 285 -34
==========================================
- Hits 277 240 -37
- Misses 42 45 +3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Summary
.status.conditionswith aReaperReadycondition that reflects the health of Reaper binaries and state directory on the node/statussubresource to upsert the condition bytypewithout disturbing other conditions (Ready, MemoryPressure, etc.)--node-condition-enabled(default: true),--node-condition-interval(default: 30s), andNODE_NAMEenv var (set via downward API)Changes
src/bin/reaper-agent/node_condition.rs— core condition patching logicnodes(get) andnodes/status(patch) permissionsNODE_NAMEenv var via downward API (spec.nodeName)reaper_agent_node_condition_updates_total,reaper_agent_node_condition_healthy#[cfg(target_os = "linux")]to fix clippy warnings on macOSTest plan
cargo clippy --workspace --all-targets -- -D warningspassescargo test --workspacepasses (222 tests)./scripts/run-integration-tests.sh --agent-onlypasses (16/16 tests)🤖 Generated with Claude Code