feature request: add support for providing propagationPolicy (i.e orphan) when deleting immutable resources
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- go
- Domain
- infrastructure
Research direction
Start by tracing the controller reconciliation dry-run and the delete request used when the force label handles immutable field errors. Define validation for the propagationPolicy annotation and preserve background as the default; done means background, foreground, and orphan produce the requested delete behavior while invalid values fail reconciliation.
Written by the indexing model from the issue text.
Description
When setting the kustomize.toolkit.fluxcd.io/force: enabled label for statefulsets, flux will delete the statefulset if it detects an immutable field error. This will delete all the statefulset's pods as a result due to kubernetes garbage collection.
As a workaround, an admission webhook can mutate pods' metadata.ownerReferences to be empty during pod creation, but admission webhooks are risky: if they fail (service is down, or throwing unhandled exceptions) they block the creation of pods, and if set to be ignored upon failure then we would risk flux deleting a statefulset and its pods all at once.
I think that a proper solution would be to add support to set the propagationPolicy of the deleteOptions in the delete request that flux makes. This can be set for example through an annotation like kustomize.toolkit.fluxcd.io/propagationPolicy: orphan in the same resource that has kustomize.toolkit.fluxcd.io/force: enabled:
- if the label
kustomize.toolkit.fluxcd.io/force: enabledis set, then the annotationkustomize.toolkit.fluxcd.io/propagationPolicyis checked - if the annotation
kustomize.toolkit.fluxcd.io/propagationPolicydoes not exist, the default policy is used, which isbackground - if the annotation
kustomize.toolkit.fluxcd.io/propagationPolicyis set tobackground,foregroundororphanthen this value will be used in the delete request - if the annotation
kustomize.toolkit.fluxcd.io/propagationPolicyis set to anything other than those values, the controller can throw an error during reconciliation dry-run.
what do you think about this feature?
- Dominant language
- Go
- Stars
- 63
- Forks
- 162
- Avg merge
- 9h 54m
- Merged PRs (30d)
- 29
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from fluxcd/pkg
-
ssa: wait errors drop the kstatus message, so health check failures don't say whyPossibly taken @schdief claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
ssa/jsondiff: honor ignored fields before dry-run validationPossibly taken @lubronzhan claimed this 31 days ago. Open
Difficulty 4/5 3-5 days Newbie friendliness 30/100
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
Maintainers usually reply within 1 day
-
Improve `make release` to support major version bumpsPossibly taken @Iam-Karan-Suresh claimed this 175 days ago. Openarea/ci
fluxcd/pkg#1172 · 3 comments · 1 reaction · 1 assignee ·
Maintainers usually reply within 1 day
Similar issues
-
Pin and verify Security Insights schema in lintinsights targetPossibly taken @imshubham22apr-gif claimed this 5 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
gemaraproj/gemara#618 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
a2aproject/a2a-go#597 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 4 days
-
scopes: GetAllowedTopics, GetProtectedTopics, and GetScopedTopics include empty topic names and do not trim whitespace charactersPossibly taken @patelshivani2283-lab claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
area/networking kind/bug
Difficulty 2/5 1-3 hours Newbie friendliness 69/100
siderolabs/talos#14972 ·
Maintainers usually reply within 1 day