feat(job-workload): add ttlSecondsAfterFinished:3600 to rendered Job manifests#43
Merged
Merged
Conversation
…manifests Adds ttlSecondsAfterFinished: 3600 to all batch/v1 Job manifests rendered by the kubernetes-workload-fragment adapter. This implements Option B of the job-name-uniqueness decision (DECISIONS.md 2026-07-12): completed Jobs are automatically cleaned up after one hour, allowing Flux to re-apply a new Job on the next reconciliation without AlreadyExists conflicts. The TTL value (3600 s) is chosen to exceed the Flux reconciliation interval plus health-check scrape window, ensuring Flux can observe Job completion before the resource is deleted. Updates the golden render hash to reflect the new Job spec shape.
The golden render hash changes on every version bump (the context digest embeds schemaVersion), so committing it causes CI failures on release PRs. This was previously fixed in a23c7cc; re-add the gitignore entry that was accidentally missing, preventing future reintroduction.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements Option B of the job-name-uniqueness decision (stalwart-provisioner Phase 3, DECISIONS.md 2026-07-12): rendered `batch/v1 Job` manifests now carry `ttlSecondsAfterFinished: 3600`.
What changes
Why
When Flux reconciles a Kustomization, it re-applies the Job manifest. If the Job has already completed, Kubernetes rejects the re-apply with `AlreadyExists`. TTL-based cleanup allows the completed Job to be automatically deleted after one hour, so the next reconciliation creates a fresh run without conflict. The 3600 s window exceeds any plausible Flux reconciliation interval + health-check scrape window, ensuring the Job completion status is observed before deletion.
Release
Patch bump to v0.17.1. stalwart-provisioner publish workflow already pins `schema-version: 0.17.0`; bump to 0.17.1 in a follow-up commit to the stalwart-provisioner release.yml.