Add TTL to zim-watcher CronJob for automatic cleanup

Jobs created by the CronJob will now auto-delete 4 days after completion.
This prevents zombie Jobs from accumulating when the CronJob spec changes
(e.g., image updates), since ArgoCD only tracks the CronJob resource itself,
not the Jobs it spawns.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Erich Blume 2026-02-03 07:18:49 -08:00
commit 4f2e49f219

View file

@ -9,6 +9,7 @@ spec:
concurrencyPolicy: Forbid
jobTemplate:
spec:
ttlSecondsAfterFinished: 345600 # Auto-delete after 4 days
template:
spec:
serviceAccountName: zim-watcher