argo-cd: Unable to disable auto-sync
Argo CD version:
Describe the bug
With app-of-apps pattern, when syncPolicy of a child application changes from “automated” to empty, Argo does not spot the difference. The child application remains in auto-sync mode, although it’s desired manifest in the parent app changes
To Reproduce
- Create an application, which creates another application with auto-sync policy
syncPolicy:
automated: {}
- After everything is synchronized change policy to
syncPolicy: {}
Expected behavior
Synchronization policy of the child application changes. However, it remains auto-sync. No Diff is spotted in spite of different live and desired manifests
Screenshots
With these live and desired manifests, the Diff tab is empty
Version
Taken from UI
v1.6.1+159674e
Note: we also spotted #3815. Seems treating of default or boolean values of syncPolicy
has changed in v1.6
About this issue
- Original URL
- State: open
- Created 4 years ago
- Reactions: 5
- Comments: 23 (2 by maintainers)
I also ran into this issue, which is disconcerting when trying to temporarily adjust settings, perform manual tests, rollbacks, or whatever else. Argo’s UI seems to allow disabling regular apps, but when using an ApplicationSet (in my case, to generate ephemeral preview environments based on PRs) I’m unable to turn off the auto sync.
I’m not sure how to recommend a resolution, but this should certainly be addressed in some fashion. I think it’s important to be able to disable sync, healing, etc on the apps created by an AppSet.
Update: For my problem (and i figure it might resolve the OPs problem as well) the issue was that in my app-of-apps pattern, the root-application was configured with
self-heal=true
, causing changes to the child-apps to be “healed” even though the child apps had a different (or no) sync-policy configured. So now my setup is: root-app:syncPolicy: automated # so new apps are auto-detected and deployed
prune: true # so removed apps get deleted
andselfHeal: false # so changes to child-apps (e.g. via the UI) do not trigger an auto sync
I hope this helps someone out there as well!
I actually found out that setting this field to the
null
equivalent disables auto syncWe are also experiencing this issue, what is the current status on this?
@sadovnikov Would you mind to re-open this issue ?
@illegalnumbers yes, this will allow folks to exclude fields from ApplicationSet’s regular updates: https://github.com/argoproj/argo-cd/pull/14743
I want to override sync policy from CLI and I also fail miserably. I tried the approach proposed by @adrian-sturm, but with no result. I tried disabling syncing at all, also with no result. From UI the situation is the same. Additionally, I don’t get any error messages, argo just keeps bringing back the original configuration.
Parent application yaml and original status:
I edited parent app and I commented out whole
syncPolicy
section:Check app once again
Running
argocd app set krowa-parent --sync-policy="none"
has no effect.Changes in UI are also immediately brought back to the original settings.
Argo CD Server version
I’d really appreciate some help 😃
I’m facing the similar problem that I cannot disable auto-snyc (nor pruning and self heal) of an application resource via the UI. It seems to me that argoCD is overwriting these changes immediately as it tries to sync and auto-heal again - which Im trying to disable! So the UI buttons must get around the self-healing and auto-syncing process to be able to work…
Any news?
I’m experiencing the same issue.
To disable the sync in the YAML manifest I set
syncPolicy: {}
but I would like to keep thesyncOption
, and today is impossible to have both.https://argo-cd.readthedocs.io/en/stable/user-guide/sync-options/#fail-the-sync-if-a-shared-resource-is-found