-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Provide a way to tell ArgoCD that it should not delete but only disown a resource #15005
Comments
+1 to this proposal. |
+1 Would be nice to have this as some of the resources are moved to being provisioned for example by terraform instead. |
+1 I'd love to have that available |
+1 this would be really useful, especially for namespaces that may be referenced in multiple applications |
Am I correct in understanding that this is a workaround for doing a one-time disown:
|
I can't speak for the original author, but this is what I do:
|
you also need to get rid of the annotation
|
Maybe an annotation like |
I can't speak for the original author of this issue, but that's definitely not a feature I'm interested in. |
I would vote for this feature that could allow resources to be disowned by ArgoCD, or they'll always appears to be out-of-sync if we don't actually want to delete them.. |
Summary
Provide an option on the Application and/or Resource level so that ArgoCD will never delete a resource but only disown it (by removing the tracking label/annotation e.g.
app.kubernetes.io/instance
).If the resource used server-side-apply then ArgoCD should remove all fields it managed.
Motivation
If Argo CD is used to patch existing resources in the cluster which are not created by Argo CD itself, it would create problems if Argo CD would delete the resource.
Example:
Using Argo CD for managing custom labels on cluster nodes.
This can be achieved by creating an Application with the sync option
ServerSideApply=true
and then creating a (or templating) partialNode
objects that only contain the labels we want to set.But this makes it rather easy to accidentally delete the node (either by directly deleting the
Node
via the UI or when theApplication
is deleted or during sync when pruning and the file was removed).It is already possible to work around some of those problems, by not setting
finalizers
on theApplication
and adding theargocd.argoproj.io/sync-options: "Delete=false,Prune=false"
annotation.But this will (only) leave the option to delete the
Node
via the UI while it is not easily possible to simply tell Argo CD to disown theNode
which will then stay in the UI asOutOfSync
forever.Also, it would be nice to remove all the fields Argo CD set/managed when disowning the node.
Proposal
Add a sync option on the
Resource
level (e.g.Disown
) that can be one of:no
(Default)only
(Only remove the tracking label/annotation whenpruning
anddeleting
a resource)andRemoveManagedFields
(Also remove all fields managed by Argo CD when using server-side-apply)Related
The text was updated successfully, but these errors were encountered: