Skip to content

bootstrap: auto-recover completed one-shot Jobs blocked by immutable template changes #155

Description

@fentas

Three times in one upgrade campaign, a chart bump changed a helm-hook-shaped one-shot Job's template and the bootstrap apply failed on Job spec.template immutability: cert-manager's startupapicheck (twice, both planes) and flux2's flux-check. The remedy is always the same and always manual: delete the COMPLETED Job, re-run — never --force-recreate the whole group for a one-shot.

Proposal: when apply hits 'field is immutable' on a batch/v1 Job whose live status is Complete (succeeded>=1, no active pods), delete-and-recreate that Job automatically and log it. Guard: never auto-delete a Job that is active or failed — those are a human's call. This keeps --force-recreate's blast radius for real conflicts while removing the one class that is provably safe.

Evidence: the upgrade campaign's audit trail records all three instances with identical resolution.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions