Skip to content

Support force delete propagation policy#1227

Open
martinohansen wants to merge 2 commits into
fluxcd:mainfrom
martinohansen:codex/propagation-policy
Open

Support force delete propagation policy#1227
martinohansen wants to merge 2 commits into
fluxcd:mainfrom
martinohansen:codex/propagation-policy

Conversation

@martinohansen
Copy link
Copy Markdown

What changed

Adds support for kustomize.toolkit.fluxcd.io/propagationPolicy when force-applying immutable resource changes. The annotation accepts background and orphan; when it is absent, the delete request leaves PropagationPolicy unset so the Kubernetes API server default applies.

Why

Force apply previously hardcoded background deletion. This prevented users from orphaning dependents during forced replacement and also meant Flux carried its own default instead of relying on Kubernetes when no annotation was set.

Validation

  • KUBEBUILDER_ASSETS=... go test -run TestForceApplyDeleteOptions -count=1
  • go test -c
  • git diff --check

make test-ssa was attempted, but the full envtest suite failed in existing Kubernetes 1.36 force-apply and API migration cases unrelated to the focused propagation-policy coverage.

Signed-off-by: Martin Hansen <dontbeevilpls@gmail.com>
Assisted-by: Codex/GPT-5
@martinohansen martinohansen marked this pull request as ready for review June 2, 2026 14:53
@martinohansen martinohansen requested a review from a team as a code owner June 2, 2026 14:53
@martinohansen
Copy link
Copy Markdown
Author

Fixes #603

Signed-off-by: Martin Hansen <dontbeevilpls@gmail.com>
Assisted-by: Codex/GPT-5
@martinohansen martinohansen force-pushed the codex/propagation-policy branch from 4f1f432 to 705b8d3 Compare June 2, 2026 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant