feat: add Kubernetes DNS support and unify example setup scripts#21
Merged
miguelgila merged 2 commits intomainfrom Feb 26, 2026
Merged
feat: add Kubernetes DNS support and unify example setup scripts#21miguelgila merged 2 commits intomainfrom
miguelgila merged 2 commits intomainfrom
Conversation
Add list marker prefix (- ) to checkbox items so GitHub renders them as task list checkboxes. Fix typo "ot" → "to". Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add REAPER_DNS_MODE env var that, when set to "kubernetes", reads the kubelet-prepared resolv.conf and writes it into the overlay — enabling Kubernetes service DNS resolution for Reaper workloads. - Add DnsMode enum, read_dns_config(), apply_kubernetes_dns() to overlay.rs - Call apply_kubernetes_dns() from do_start() daemon path (fatal on failure) - Set REAPER_DNS_MODE=kubernetes in Ansible install playbook - Add test_kubernetes_dns_resolution() integration test - Replace hardcoded ClusterIP in example 08 with DNS names - Unify all example setup.sh: default to published releases, --build for source - Add --help/-h to all example setup.sh scripts 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 #21 +/- ##
==========================================
+ Coverage 86.20% 86.44% +0.23%
==========================================
Files 4 4
Lines 174 177 +3
==========================================
+ Hits 150 153 +3
Misses 24 24 ☔ 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
REAPER_DNS_MODEenv var (kubernetes/k8s) writes the kubelet-prepared resolv.conf into the overlay namespace, enabling Reaper workloads to resolve Kubernetes service names (e.g.,my-svc.default.svc.cluster.local) via CoreDNSsetup.shscripts now default to downloading published release binaries, with a--buildflag for source compilation. Added--help/-hto all scripts.clusterIP: 10.96.100.100with DNS-based service discovery, demonstrating the new DNS featureChanges
Core (
overlay.rs,main.rs)DnsModeenum +read_dns_config()readsREAPER_DNS_MODEenv varapply_kubernetes_dns()finds/etc/resolv.confOCI mount, reads content via/proc/1/root/<source>, writes it into the overlaydo_start()after volume mounts, before workload spawnAnsible (
install-reaper.yml)REAPER_DNS_MODE=kubernetesto/etc/default/containerd(default for Ansible-deployed clusters)Integration tests
test_kubernetes_dns_resolution()verifying Reaper pods can resolvekubernetes.default.svc.cluster.localand a custom ClusterIP serviceExamples (01-08)
setup.shscripts: added--help,--build, release version resolution viascripts/lib/release-utils.shTest plan
cargo test— unit tests pass (DNS config parsing)cargo clippy --target x86_64-unknown-linux-gnu --all-targets— cleanbash -nsyntax check on all 8 setup.sh scripts./scripts/run-integration-tests.sh— full suite including newtest_kubernetes_dns_resolution--buildflag, verifygetent passwd user1resolves via DNS🤖 Generated with Claude Code