-
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
No-diff Sync Fails #16070
Comments
Have you enabled the respect ignore diff sync option? |
I have indeed, the application has application level ignore diffs which are working. This is a system level ignore diffs. The app shows as synced, but clicking sync says failed, although the app is still in sync. I've tried hard refresh and deleting/recreating the application (non-cascade delete). |
Can you share the application spec? |
Sure, here you go:
|
#12569 looks to be the same issue. Nasty, but I wonder if you can ignore the entire |
I've tried that an it's still failing to sync... It's slightly strange because as I've said, ArgoCD reports that there is no differences, and the app is in sync. So theoretically, clicking sync shouldn't actually do anything.
|
Looking further at the error, it actually appears that argo is complaining about the storage class name field:
I've tried ignoring this too, to no avail. |
I've managed to resolve this by adding the I'm going to leave this open though, as ignoring the storageClassName did not work.
Neither did ignoring the entire PVC spec. And as mentioned previously, ArgoCD reports that the individual PVC resource is synced, so syncing should not fail as there is no work to do. |
We have a similar issue, but with the After some digging and comparing an Application that we can sync successfully to one we can't (both using the same underlying Helm chart and very similar PVC definitions) I think I might have found the issue, and (spoilers) I think it's the same as #13965 (comment) In our case ArgoCD is adopting resources previously created with client-side kubectl apply, and I can see in the failing Application that the
Whereas in the working Application, that field is still managed by the
So presumably when we issue a server-side apply in ArgoCD, K8s added all those fields to Argo's ownership, and now when Argo applies a patch to that resource, K8s treats a missing managed field as having its default value of empty string. See https://kubernetes.io/docs/reference/using-api/server-side-apply/#field-management
So, because our Helm chart doesn't set that That tallies with the sync error I see:
We're going to try to resolve this by patching out Based on kubernetes/kubectl#1337 it sounds like this is expected behaviour on the K8s side, so maybe it needs some warning docs on the ArgoCD side to warn about adopting old client-side applied resources into server-side-applied Applications? Edited to add, we're running ArgoCD v2.10.1, deploying to a K8s cluster on v1.24 |
Ah, some new information - this happens for us even without server-side-apply getting involved. We believe this happens because - before we used ArgoCD to manage this deployment - the previous team injected the existing
And that means that |
thanks a lot @jMarkP ! removing the maybe this should be mentioned in the doc? |
ArgoCD versions 2.10 and below have reached EOL. Can you upgrade and let us know if the issue is still present, please? |
Checklist:
argocd version
.Describe the bug
I restored a PVC, which added dataSource and dataSourceRef spec fields to the PVC (referring to the source VolumeSnapShot).
This rightly caused ArgoCD to report the application as out of sync, as it is unaware of these dataSource fields.
To work around this, I added the below configuration to the ArgoCD configmap:
This worked, and now the PVC and application shows as 'Synced'.
However, despite the fact that ArgoCD shows now there is no diff, and the application is in sync, when I click sync, I get sync failed.
To Reproduce
Expected behavior
I expect the application to be in sync, and syncing to be successful.
Version
Logs
The text was updated successfully, but these errors were encountered: