-
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
manifest-generate-paths with autosync causes an undesirable refresh sync #18326
Comments
Hey @zswanson, just to make sure I understand correctly, basically selfHeal=false is not respected when the application sync revision is not HEAD, and it works when the sync revision is HEAD? Also, can you add the logs, mostly related to argo-cd/controller/appcontroller.go Line 1815 in 0f72c19
automated sync and after the second kubernetes change.
I think the argo-cd/controller/appcontroller.go Line 1944 in 0f72c19
|
Hey sorry I kept forgetting to respond here. I would not say it's accurate to describe this as the self heal not being respected. Rather, it seems that if you are making a manual change to an application from the minor repo, and that application wad not already sync'd to HEAD from its last state that the controller first performs a sync to HEAD. That has the effect of undoing whatever change you'll manually tried to make. Them after that sync you can now make a manual change in-cluster. I'll try this week to see if I can get some logs around it. |
This occurs because, during the reconciliation loop, ArgoCD checks whether to execute self-healing using the condition: The "already attempted" state is determined by the condition I have PR draft, i will open it in coming day or two. |
During testing we discovered issue with sync, i am continue working on it, sorry for delay |
I believe my PR may have solved this? #19512 |
Unfortunately no @Ezzahhh . |
Checklist:
argocd version
.Describe the bug
manifest-generate-paths
behavior was adjusted in the 2.11.0 release to properly align with user expectations in mono-repos to control syncing of applications to specific paths. There is apparently some leftover logic in the app controller or newly introduced though, where upon detecting drift in a cluster resource for an app usingmanifest-generate-paths
and autosync, that the controller does a 'refresh' sync to the HEAD commit of the repo (even though that may not related to the path of the managed application). If for some reason a cluster operator is attempting to make a manual change temporarily to an application (ie, during an incident) this has the effect of reverting the manual change, almost instantly. After that refresh sync, the cluster operator is able to apply the desired manual change again and then it will persist. We have explicitly set selfHeal to false in order to allow occasional imperative actions by our cluster operators, so this is undesirable behavior.To Reproduce
manifest-generate-paths: .
and setspec.syncPolicy.automated
to enabled, withselfHeal: false
. The application source should be some sub-path in the repository like '/app1/` This will require github webhooks.Expected behavior
The app controller should not sync the App to the head commit, and the manual introduced change should persist on the first attempt.
Screenshots
Version
Logs
The text was updated successfully, but these errors were encountered: