Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow background delete option when deleting apps and resources #5216

Closed
jessesuen opened this issue Jan 8, 2021 · 4 comments · Fixed by #5524
Closed

Allow background delete option when deleting apps and resources #5216

jessesuen opened this issue Jan 8, 2021 · 4 comments · Fixed by #5524
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers
Milestone

Comments

@jessesuen
Copy link
Member

jessesuen commented Jan 8, 2021

Summary

Currently we only allow foreground deletion of objects, but due to Kubernetes GC buggy behavior about deletion, foreground deletion can block indefinitely. The only workaround in Argo CD is a force deletion which is more abrasive approach than performing a background deletion. We should expose an option in UI, CLI, API to perform background deletion of resources and applications.

@jessesuen jessesuen added the enhancement New feature or request label Jan 8, 2021
@jessesuen jessesuen added this to the v1.9 milestone Jan 8, 2021
@jessesuen jessesuen added the good first issue Good for newcomers label Jan 8, 2021
@chetan-rns
Copy link
Member

Hi @jessesuen, Is this solved by setting the PropagationPolicy as Background while deleting? Could you please assign me this issue?

@rbreeze
Copy link
Member

rbreeze commented Feb 4, 2021

@chetan-rns would you still like to work on this?

@chetan-rns
Copy link
Member

Thanks @rbreeze I'm looking into it. Could you please assign me this issue?

@rbreeze
Copy link
Member

rbreeze commented Feb 4, 2021

Will do!

chetan-rns added a commit to chetan-rns/argo-cd that referenced this issue Mar 12, 2021
Currently, Argo CD only supports foreground propagation policy ie. delete all the resources in the foreground and then delete the application in the end. This PR introduces a new flag `propagation-policy` to decide the type of policy when cascading is enabled. It also adds an annotation `propagation-policy.argocd.argoproj.io`, which is used by the application controller to decide the order of deletion.

Fixes: argoproj#5216
Signed-off-by: Chetan Banavikalmutt <chetanrns1997@gmail.com>
jannfis pushed a commit that referenced this issue Mar 15, 2021
…ns (#5216) (#5524)

* feat: support background propagation policy

Currently, Argo CD only supports foreground propagation policy ie. delete all the resources in the foreground and then delete the application in the end. This PR introduces a new flag `propagation-policy` to decide the type of policy when cascading is enabled. It also adds an annotation `propagation-policy.argocd.argoproj.io`, which is used by the application controller to decide the order of deletion.

Fixes: #5216
Signed-off-by: Chetan Banavikalmutt <chetanrns1997@gmail.com>

* fix lint and doc errors

Signed-off-by: Chetan Banavikalmutt <chetanrns1997@gmail.com>

* update logs to display the application name

Signed-off-by: Chetan Banavikalmutt <chetanrns1997@gmail.com>

* address review comments

* remove application name from logs since it's already present
* update the propagation policy annotation key

Signed-off-by: Chetan Banavikalmutt <chetanrns1997@gmail.com>

* Add radio buttons in the UI to select propagation policy

Signed-off-by: Chetan Banavikalmutt <chetanrns1997@gmail.com>

* inject finalizers instead of annotations for specifying propagation policy

Signed-off-by: Chetan Banavikalmutt <chetanrns1997@gmail.com>

* rebase branch on master

Signed-off-by: Chetan Banavikalmutt <chetanrns1997@gmail.com>

* update the controller to set the policy only for application's resources

Signed-off-by: Chetan Banavikalmutt <chetanrns1997@gmail.com>

* fix the label of policy radio button

Signed-off-by: Chetan Banavikalmutt <chetanrns1997@gmail.com>
shubhamagarwal19 pushed a commit to shubhamagarwal19/argo-cd that referenced this issue Apr 15, 2021
…ns (argoproj#5216) (argoproj#5524)

* feat: support background propagation policy

Currently, Argo CD only supports foreground propagation policy ie. delete all the resources in the foreground and then delete the application in the end. This PR introduces a new flag `propagation-policy` to decide the type of policy when cascading is enabled. It also adds an annotation `propagation-policy.argocd.argoproj.io`, which is used by the application controller to decide the order of deletion.

Fixes: argoproj#5216
Signed-off-by: Chetan Banavikalmutt <chetanrns1997@gmail.com>

* fix lint and doc errors

Signed-off-by: Chetan Banavikalmutt <chetanrns1997@gmail.com>

* update logs to display the application name

Signed-off-by: Chetan Banavikalmutt <chetanrns1997@gmail.com>

* address review comments

* remove application name from logs since it's already present
* update the propagation policy annotation key

Signed-off-by: Chetan Banavikalmutt <chetanrns1997@gmail.com>

* Add radio buttons in the UI to select propagation policy

Signed-off-by: Chetan Banavikalmutt <chetanrns1997@gmail.com>

* inject finalizers instead of annotations for specifying propagation policy

Signed-off-by: Chetan Banavikalmutt <chetanrns1997@gmail.com>

* rebase branch on master

Signed-off-by: Chetan Banavikalmutt <chetanrns1997@gmail.com>

* update the controller to set the policy only for application's resources

Signed-off-by: Chetan Banavikalmutt <chetanrns1997@gmail.com>

* fix the label of policy radio button

Signed-off-by: Chetan Banavikalmutt <chetanrns1997@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants