feat: ReaperDaemonJob CRD for node configuration tasks#58
Merged
miguelgila merged 7 commits intomainfrom Mar 22, 2026
Merged
Conversation
Adds a new CRD that runs commands to completion on every matching node, with support for dependency ordering, retry policies, and shared overlays. Controller layering: ReaperDaemonJob → ReaperPod → Pod (no changes to existing runtime or reaper-controller reconcilers). Key features: - Per-node status tracking with retry support - Dependency ordering via `after` field - Shared overlay support via `overlayName` for composable vServices - Node selector filtering with Ready-node validation - Concurrency policy (Skip/Replace) - Spec-change detection triggers re-execution Closes #54 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Phase 4d in the integration test suite with 7 tests: - CRD installation and establishment - Simple DaemonJob creates ReaperPods per node - Status tracking (phase, readyNodes, totalNodes) - Per-node status entries with Succeeded phase - kubectl get columns (PHASE, READY, TOTAL) - Dependency ordering via `after` field - GC of ReaperPods on DaemonJob deletion Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #58 +/- ##
==========================================
+ Coverage 84.78% 85.06% +0.27%
==========================================
Files 6 6
Lines 309 308 -1
==========================================
Hits 262 262
+ Misses 47 46 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
CI cross-compilation for Linux resolves these types from k8s_openapi, not kube::api. Also removes unused ReaperPodStatus import. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Generated via scripts/generate-crds.sh, deployed to both deploy/kubernetes/crds/ and deploy/helm/reaper/crds/. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The generated Helm CRD copy was truncated (missing status schema, served/storage/subresources fields). Re-copied from the complete kubernetes/crds version. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The controller needs: - reaperdaemonjobs + reaperdaemonjobs/status access - nodes get/list/watch for node targeting - reaperpods create/delete (DaemonJob reconciler creates ReaperPods) Updated both deploy/kubernetes/reaper-controller.yaml (used by CI) and deploy/helm/reaper/templates/controller-rbac.yaml. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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
ReaperDaemonJobCRD that runs commands to completion on every matching nodeReaperDaemonJob → ReaperPod → Pod(no changes to existing runtime)retryLimit)afterfield for composable vServicesoverlayName(e.g., one job mounts FS, next installs packages)Skip/Replace) and spec-change re-triggerFiles added/changed
src/crds/reaper_daemon_job.rs— CRD types (spec, status, per-node status)src/bin/reaper-controller/daemon_job_reconciler.rs— Reconciler (node listing, ReaperPod creation, status tracking)src/bin/reaper-controller/main.rs— Wire in third controller + CRD generationsrc/crds/mod.rs— Export new moduledeploy/helm/reaper/templates/controller-rbac.yaml— RBAC for nodes + reaperdaemonjobsexamples/12-daemon-job/— Simple and composable vService examplesCloses #54
Test plan
cargo clippy --workspace --all-targets -- -D warningspasses (macOS)cargo clippy --target x86_64-unknown-linux-gnu --all-targets -- -D warningspasses (Linux cross-compile)cargo test --workspacepasses (222 tests, including new CRD serde + reconciler unit tests)🤖 Generated with Claude Code