-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Application CRD status.resources
do not reflect argocd.argoproj.io/sync-options: Prune=false
#17188
Comments
@crenshaw-dev @gdsoumya @ishitasequeira @fengshunli I think this is an important bug to fix, and I am interested in your feedback. |
@gdsoumya I don't think that makes sense, because if the ConfigMap was in the git source, it would not require pruning. And if it were previously in the git source (but was removed), then it would be functionally equivalent to creating the ConfigMap manually with the same EDIT: looks like the comment I was replying to from @gdsoumya got deleted, but I will leave this comment up. |
@pasha-codefresh as this is probably related to Also, I found issue #8134, which shows that this issue has been impacting users since at least Jan 2022, because |
argocd.argoproj.io/sync-options: Prune=false
not respected in Application CRD (and thus CLI and UI)status.resources
do not reflect argocd.argoproj.io/sync-options: Prune=false
@crenshaw-dev @ishitasequeira @pasha-codefresh @kostis-codefresh This is a very important user issue with a relatively simple fix. We need to make it so that the For most users, the biggest impact of the current issue is the ArgoCD UI will show resources with There is a related issue #14338 for the |
At a quick glance, what you're saying sounds reasonable. I'm inclined to accept that change. |
I agree with @crenshaw-dev and @thesuperzapper |
@thesuperzapper Are you already working on a PR for that behavior change? If not, I should be able to give this a try in the coming weeks. |
@cezarsa actually yes, I have an almost working prototype, I ended up approaching it slightly differently. The key difference to what I proposed above is that I leave the This is because I still want to actually show these in the UI (with an optional filter on the left), because it's not correct to say that these resources don't "require pruning", and setting it to false just causes it to show as "in sync". It's better if we have a special icon to indicate that we aren't going to actually remove it, but that it is actually extraneous (not in the "desired" state). I'm also planning to add an |
@thesuperzapper, are you still working on the PR? |
Checklist:
argocd version
.Describe the bug
The
argocd.argoproj.io/sync-options: Prune=false
annotations are not respected by the Application controller.The application controller lists these resources as
requiresPruning: true
in the CRDstatus.resources[]
field.This is a problem in two significant places:
argocd.argoproj.io/compare-options: IgnoreExtraneous
is set on the resource.argocd app get -o json
command.To Reproduce
my-app
(it doesn't matter what is in it):app.kubernetes.io/instance
label with the ArgoCD app andargocd.argoproj.io/sync-options: Prune=false
annotation:argocd app get
command shows the ConfigMap asrequiresPruning: true
:Expected behavior
Both the CRD itself (and therefore ArgoCD CLI and UI) correctly reflect the presence of
argocd.argoproj.io/sync-options: Prune=false
.For example, in the above situation, I would expect to see the
status.resources
like this:Version
Other Notes
There is a similar issue with
argocd.argoproj.io/compare-options: IgnoreExtraneous
(see #14338), but that will be more complex to fix, because it probably requires a new "resource status" of "ignored" as it is not correct to say that an ignored resource is "Synced".The text was updated successfully, but these errors were encountered: