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

Annotation on child resources so ArgoCD doesn't delete them when parrent Application gets deleted #5945

Open
JoaoBraveCoding opened this issue Apr 1, 2021 · 3 comments
Labels
enhancement New feature or request

Comments

@JoaoBraveCoding
Copy link

JoaoBraveCoding commented Apr 1, 2021

Summary

Proposal is to introduce an annotation like:

metadata:
  annotations:
    argocd.argoproj.io/sync-options: Prune=false

That would prevent a resource from being deleted when we delete an Application. Currently, there is no way to leave orphaned resources without removing the finalizer from the Application

ArgoCD Version 1.7.11

Motivation

We deploy ArgoCD on Openshift to manage all our cluster configuration. There are some resources that we have to configure, but these resources can never be deleted from a cluster. However, in some use cases we want to reconfigure these resources with a different Application, however we cannot delete the old application as ArgoCD gets stuck in an infinite loop of trying to delete the old Application.

Proposal

Either update the deletion login to skip resources with the annotation:

metadata:
  annotations:
    argocd.argoproj.io/sync-options: Prune=false

Or simply introduce a new annotation:

metadata:
  annotations:
    argocd.argoproj.io/delete-options: Prune=false
@JoaoBraveCoding JoaoBraveCoding added the enhancement New feature or request label Apr 1, 2021
@JoaoBraveCoding
Copy link
Author

Change should probably be introduce somewhere around here

JoaoBraveCoding added a commit to JoaoBraveCoding/argo-cd that referenced this issue Apr 8, 2021
…rgoproj#5945

Signed-off-by: JoaoBraveCoding <joao.marcal12@gmail.com>
@ghost
Copy link

ghost commented May 11, 2021

We've got a similar usecase here on OC 🎉

@raolivei
Copy link

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants