-
Notifications
You must be signed in to change notification settings - Fork 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
Empty objects vs. null objects cause repeated syncs #18213
Comments
Is this with Server Side Diff on or off? I would imagine looking at https://argo-cd.readthedocs.io/en/stable/user-guide/diff-strategies/#server-side-diff may help with scenarios like this. I don't believe there's plans to make the default Server Side Diff until a 3.x release but this may be something you want to take a look at... |
i just tried enabling that and it didn't seem to make a difference on my environment |
FWIW, this works for me for the "resources: {}" diff
|
I haven't set any options for server side diff in the application or the main configmap, so it should be off.
@evanrich Thanks, I was hoping I wouldn't have to ignore resources for the cases where there are real differences, but I can probably use that for now. |
This is very strange, I have multiple clusters with basically the same configuration. Same application (external-secrets) deployed to both clusters. I verified that on the cluster which is not showing a diff and therefore not syncing has So same application running in the same version of Argo and Kubernetes seems to sometimes ignore this difference and sometimes not ignore it. |
Noticed this problem with version 2.11 quite a lot Adding this to ignoreDifferences doesn't seem like a good idea to me |
This has suddenly emerged in my k3s cluster as well. Kubernetes version: v1.30.0+k3s1 |
Similar issue: #13004 |
Just wanted to note that I also tried enabling server side diff, but it didn't have any effect on this issue. |
I haven't seen any updates in the release notes for recent releases that indicate this has been changed, so I'm staying on helm chart version 6.7.18 (argo v2.10.9) hopefully this gets addressed/commented on soon because it's not just empty objects but the a ton of other resources as well are suddenly throwing sync errors in latest versions. |
Same problem here. Like others, I have used ignoreDifferences:
- group: apps
kind: "*"
jqPathExpressions:
- ".spec.template.spec.containers[].resources"
- group: apps
kind: "*"
jqPathExpressions:
- ".spec.template.spec.initContainers[].resources" |
Summary
When a config option is not set in the a kube manifest (e.g. statefulset) ArgoCD continually tries to re-sync the object because it sees a diff between an empty and undefined object.
Motivation
I have a statefulset that does not define the
resources
section. ArgoCD continually tries to sync the object because Kubernetes automatically injects an empty object.Proposal
The diff calculator should ignore the difference between an empty and null object in a kubernetes resource field.
Related
#15554
The text was updated successfully, but these errors were encountered: