feat: ReaperPod CRD, reaper-controller, and Helm chart#31
Merged
miguelgila merged 18 commits intomainfrom Mar 7, 2026
Merged
Conversation
Introduce a ReaperPod custom resource that provides a simplified, Reaper-native way to run workloads. A new reaper-controller binary watches ReaperPod resources and creates real Pods with runtimeClassName pre-configured, translating the simplified spec (inline volumes, dnsMode, overlayName) into full Pod specs with owner references. - CRD types with own simple structs (avoids k8s-openapi schemars dep) - Pod builder with 9 unit tests covering all field translations - Reconciler using kube::runtime::Controller with owns() for Pod watches - Deployment manifests, Dockerfile, build/generate scripts - Example YAMLs (simple-task, with-volumes, with-node-selector) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Phase 4b tests: CRD installation, controller deployment, ReaperPod creation with Pod verification, status mirroring, exit code propagation, annotation translation, kubectl column output, and GC on delete. Also updates build-controller-image.sh to match agent build pattern (--cluster-name, --skip-build, --quiet) and wires controller image build into phase_setup. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Skips cargo tests, integration tests, and agent tests — runs only Phase 4b controller tests (CRD install, ReaperPod lifecycle, status mirroring, annotation translation, GC). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The controller deployment targets the reaper-system namespace, which is normally created during agent setup. When running with --crd-only, agent setup is skipped, causing "namespace not found" errors. Create the namespace idempotently before applying the controller manifest. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- CLAUDE.md: add controller binary, CRD types, scripts, and example 09 to project structure; document Phase 4b in integration test phases - TESTING.md: add --crd-only and --agent-only flags; add Phase 4b controller tests; add CRD iteration example - examples/README.md: add 09-reaperpod section with usage instructions - examples/09-reaperpod/simple-task.yaml: add namespace prerequisite - docs/CRD_PLAN.md: note namespace fix for --crd-only runs Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Installs the ReaperPod CRD, builds and loads the controller image into Kind, and deploys the reaper-controller. Adds CRD usage examples to the playground summary output. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The ReaperPod CRD and reaper-controller are now installed by default when setting up a playground cluster. Remove the --with-controller flag since this is the standard mode of operation. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Use --context=kind-<cluster-name> in all example commands so they work correctly when multiple Kind clusters are running. Also add an inline ReaperPod one-liner example. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace generateName with a fixed name so the Pod created by the controller has the same name as the ReaperPod. This enables `kubectl logs <reaperpod-name>` to work directly without needing to look up the Pod name from the ReaperPod status. 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 #31 +/- ##
=======================================
Coverage 84.21% 84.21%
=======================================
Files 6 6
Lines 285 285
=======================================
Hits 240 240
Misses 45 45 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Add a Helm chart (deploy/helm/reaper/) that installs everything needed to run Reaper: node DaemonSet with init container for binary installation, controller Deployment, CRDs, RuntimeClass, and RBAC. - Add Dockerfile.node and scripts/install-node.sh for init container - Add scripts/build-node-image.sh for Kind image builds - Rewrite setup-playground.sh to use Helm instead of Ansible - Update test-phases.sh to use Helm-based setup - Make CRD/controller tests idempotent (work with Helm or standalone) - Mark Ansible deployment as DEPRECATED (kept but no longer default) - Update README.md and CLAUDE.md to reflect Helm as default All 8 CRD integration tests pass with the new Helm-based flow. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Update TESTING.md, RELEASING.md, and deploy/kubernetes/README.md to reflect Helm as the default installation method. Mark Ansible references as deprecated throughout. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
setup-playground.sh no longer supports --release (Helm handles installation). Remove the CI job that tested release resolution modes. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add --features controller --bin reaper-controller to musl build step - Include reaper-controller in uploaded artifacts - Replace 'Install Ansible' step with 'Install Helm' for kind-integration The controller binary was missing from CI artifacts, causing build-controller-image.sh --skip-build to fail in kind-integration. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
yield_now() is insufficient under CI load — the kernel may still hold the inode after chmod. A small sleep reliably avoids the ETXTBSY race when exec'ing a freshly-written shell script. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
With CRD controller tests (Phase 4b) added on top of agent GC tests (some taking 90-120s each), 20 minutes is too tight. Increase to 30 minutes to give the full suite room to complete. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <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
reaper.io/v1alpha1) — simplified Reaper-native workload definitionruntimeClassName: reaper-v2deploy/helm/reaper/) — replaces Ansible as the default installation methodkubectl logs <reaperpod-name>)Helm Chart
The Helm chart installs everything needed to run Reaper:
reaperpods.reaper.iocustom resourcereaper-v2Ansible deployment is marked as DEPRECATED (kept but no longer tested in CI).
Test plan
helm lint deploy/helm/reaper/passeshelm templaterenders all resources correctly--crd-only)cargo clippyandcargo fmtpass🤖 Generated with Claude Code