Post

Retire Historical Pods That Hold Upstream Image References

Retire Historical Pods That Hold Upstream Image References

This push documents a one-time GitOps cleanup that removes retained terminal pods holding old upstream image references from Argo CD’s image summary. The note adds guardrails that spare active pods, recent failures, and Job history, keeping the image view clean without erasing useful context.

Scope the Harbor OCI pod retirement

I added a section to the Harbor OCI operations note describing a cleanup Job that Argo CD runs against retained terminal pods. The procedure is deliberately narrow: it only targets reviewed ReplicaSet pod names in listed namespaces, requires an upstream image reference, and checks that at least thirty days have passed since completion. Active pods, recent failures, and Job history are explicitly left in place, which prevents the cleanup from masking genuine problems or deleting in-flight work.

Separate the documented procedure from the cleanup execution

The push summary shows the cleanup logic and related configuration are among the withheld files, so this merge adds the operational record rather than proving the Job has already run. I can state that the procedure is now written down and the criteria are defined, but I cannot claim from this evidence that any pod has been deleted. The documentation is the current fact; the cleanup outcome is the pending check.

Apply the safe-retirement pattern elsewhere

A platform team that runs Argo CD alongside a registry or image catalog can use the same pattern when terminal pods distort their image views. The key is to gate cleanup on explicit conditions like reviewed names, namespace scoping, and a retention threshold, then prune the temporary RBAC and configuration through GitOps once the operation is verified. In our homelab the next step is to confirm the reviewed pods are absent and the cleanup identities are removed, but the guarded approach is now the reference.

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