// the find
lwolf/kube-cleanup-operator
Kubernetes Operator to automatically delete completed Jobs and their Pods
A small Go controller that watches Jobs and Pods and deletes the ones that have finished, failed, or gotten stuck (pending, evicted, orphaned), on a per-state timer. It's for teams running a lot of Kubernetes Jobs who are tired of kubectl get pods showing hundreds of Completed entries and want a set-and-forget cleanup process rather than a cron script.
It does one narrow thing and does it with actual tests — job_test.go and pod_test.go cover the controller logic, and there's a dry-run flag so you can watch what it would delete before trusting it in a real cluster. It exposes Prometheus-style metrics on a configurable listen-addr, and RBAC manifests plus a maintained Helm chart are included so you're not reverse-engineering the permissions it needs.
The flag interface went through a breaking rename at v0.7.0 and the project never finished the migration — it still ships both the old keep-* flags and the new delete-*-after flags behind a legacy-mode switch that defaults to true, so a fresh install silently uses the old behavior unless you know to flip it. Despite the name it's not a CRD-based operator, just a controller watching core Pod/Job events, so don't expect kubectl get on a custom resource. ignore-owned-by-cronjobs — the flag most people running scheduled Jobs will actually want — is still marked EXPERIMENTAL with no indication of when or if that changes. The repo also vendors its entire dependency tree in-tree, which bloats clone size and makes it harder to see what a dependency bump actually changed.