Skip to content

feat: add examples 05-08 (kubemix, ansible, mixed runtimes)#20

Merged
miguelgila merged 13 commits intomainfrom
more-examples-1
Feb 20, 2026
Merged

feat: add examples 05-08 (kubemix, ansible, mixed runtimes)#20
miguelgila merged 13 commits intomainfrom
more-examples-1

Conversation

@miguelgila
Copy link
Owner

Summary

  • 05-kubemix: Jobs, DaemonSets, and Deployments on a 10-node cluster, each workload type targeting labeled node groups
  • 06-ansible-jobs: Sequential Jobs demonstrating overlay persistence — Job 1 installs Ansible, Job 2 runs an Ansible playbook to install nginx
  • 07-ansible-complex: Fully reboot-resilient Ansible deployment using DaemonSets with init container dependencies (bootstrap → nginx on login nodes, htop on compute nodes)
  • 08-mix-container-runtime-engines: Mixed runtime engines in the same cluster — containerized OpenLDAP (default runc) alongside Reaper workloads that configure SSSD on all workers via Ansible. First example showing Reaper consuming a service from a traditional container.

Test plan

  • Example 08 tested end-to-end on a 4-node Kind cluster
  • OpenLDAP seeded 5 posixAccount users via sidecar ldapadd
  • SSSD configured on all 3 workers (ansible-playbook succeeded on each)
  • getent passwd user1 resolves correctly from a fresh Reaper pod
  • Examples 05-07 smoke test (previously validated on earlier commits)

🤖 Generated with Claude Code

miguelgila and others added 13 commits February 20, 2026 10:54
Demonstrates running all three Kubernetes workload types simultaneously
on a 10-node cluster (3 batch + 3 daemon + 3 service workers), each
reading config from dedicated ConfigMap volumes. Uses pre-built release
binaries instead of building from source.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sequential Jobs on a 10-node cluster: Job 1 installs Ansible via apt
on all workers, Job 2 runs an Ansible playbook (from ConfigMap) to
install and verify nginx. Showcases shared overlay state persisting
between workloads. Uses pre-built release binaries.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
kubectl delete/apply -f on a directory parses all .yml files as
Kubernetes manifests. The Ansible playbook is not a K8s resource.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
kubectl parses any file ending in .yml/.yaml in a directory. Use
.ansible extension instead so the playbook is fully ignored.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Uses a DaemonSet instead of a Job to install Ansible — kubelet restarts
it after node reboots, reinstalling into the fresh overlay automatically.
Workers labeled as login (2) or compute (7) with role-based targeting.
Includes nginx playbook Job targeting login nodes only.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The Job's init container polls for ansible-playbook in the shared
overlay, creating an implicit dependency on the bootstrap DaemonSet.
This allows deploying everything with a single kubectl apply -f.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Deploys htop on all compute nodes (7) via Ansible playbook from
ConfigMap. Uses same init container pattern to wait for the bootstrap
DaemonSet. Both Jobs run in parallel after a single kubectl apply.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Jobs run once and won't re-run after a reboot — packages installed in
the overlay are lost. DaemonSets are restarted by kubelet, reinstalling
everything into the fresh overlay automatically. Init containers still
handle the dependency on ansible-bootstrap.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Mixed runtime demo: OpenLDAP (default containerd/runc) alongside Reaper
workloads that configure SSSD on all worker nodes. First example showing
Reaper consuming a service from a traditional container.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
bitnami/openldap tags are no longer available on Docker Hub. Switch to
osixia/openldap:1.5.0 with a sidecar container that seeds LDIF via
ldapadd -c after the server is ready. This avoids osixia's fragile
bootstrap mechanism (status 68 failures). Also adds the base DN entry
to the LDIF and uses authenticated searches (osixia ACLs block anonymous
reads).

Tested end-to-end: OpenLDAP boots, seeder loads 5 posixAccount users,
SSSD configured on all 3 workers, getent passwd user1 resolves correctly.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The first NSS lookup in a fresh Reaper process can fail because SSSD's
responder socket hasn't connected yet. A 1s sleep before getent ensures
the lookup succeeds reliably.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Completed by example 08-mix-container-runtime-engines.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@miguelgila miguelgila merged commit eaa34f4 into main Feb 20, 2026
6 checks passed
@codecov
Copy link

codecov bot commented Feb 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.20%. Comparing base (7a0af59) to head (d538200).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #20   +/-   ##
=======================================
  Coverage   86.20%   86.20%           
=======================================
  Files           4        4           
  Lines         174      174           
=======================================
  Hits          150      150           
  Misses         24       24           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@miguelgila miguelgila deleted the more-examples-1 branch February 28, 2026 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant