Post

Tracking retired Compass pod cleanup as a GitOps Job

Tracking retired Compass pod cleanup as a GitOps Job

I updated the application notes to track the retired Compass pod cleanup as a dedicated Job, ensuring that self‑heal does not recreate the pod and that the cleanup is fully observable through Argo CD and GitOps tooling.

Job added to application‑notes.md

The openwiki/workloads/application-notes.md was modified to replace a hook‑only change with an explicit Job that the retired Compass pod cleanup runs under. The new Job checks the historical pod’s finished phase, its ReplicaSet, and the old image before attempting deletion with UID and resource‑version preconditions.

What the Job enforces

The Job enforces that the pod is in a finished phase, that the ReplicaSet matches the expected state, and that the old image reference is correct. After those checks pass it performs a delete request that validates the UID and resource version returned by Kubernetes, preventing accidental removal of unrelated resources.

Verification flow after the change

After the Job runs, operators verify that the pod is absent, the Deployment is ready, and Argo CD has updated its image summary to reflect the cleanup. Only after those checks pass is the Job and its RBAC removed, leaving a clean state where self‑heal will not recreate the retired pod.

Platform‑engineering transfer

Any team running a Kubernetes GitOps homelab can copy this pattern: add a Job to the workload notes that validates pod phase, ReplicaSet, and image before deletion, then verify pod absence and Argo CD state before cleaning up the Job itself. This makes retired‑pod removal observable, repeatable, and safe across clusters.

This post is licensed under CC BY 4.0 by the author.