argoproj / argo-cd

Declarative Continuous Deployment for Kubernetes
https://argo-cd.readthedocs.io
Apache License 2.0
17.82k stars 5.44k forks source link

Server-Side Diff Reports out of sync on "status" key (among other noisy diffs) #17394

Open sthomson-wyn opened 8 months ago

sthomson-wyn commented 8 months ago

Checklist:

Describe the bug

Applications using server-side diff report incorrect diffs. Especially notable with app-of-apps, daemonsets.

To Reproduce

Enable server-side diff

Expected behavior

Don't report diffs on fields that shouldn't be synced

Screenshots

Example: an argoCD Application in an app-of-apps setup changes its status when the application syncs image

Daemonsets reporting out of sync when a new node is being added / a pod isn't ready yet image

Reporting missing labels, even after syncing image

Version

argocd: v2.9.3+6eba5be.dirty
  BuildDate: 2023-12-02T00:36:55Z
  GitCommit: 6eba5be864b7e031871ed7698f5233336dfe75c7
  GitTreeState: dirty
  GoVersion: go1.21.4
  Compiler: gc
  Platform: linux/amd64
argocd-server: v2.10.2+fcf5d8c

Logs

Paste any relevant application logs here.
llavaud commented 8 months ago

also experience these problems with latest version 2.10.2

zswanson commented 7 months ago

2.10.4 just installed from 2.9.x, after enabling server side diff and waiting for a bit I had a couple of Apps report OutOfSync status due to a missing app label - which they all had on the resources. Disabled the server side diff, the app immediately went to a good sync state.

rouke-broersma commented 6 months ago

I'm having the same issue. I'm deploying emqx (mqtt broker) which for some reason likes to use the status field to keep track of the uptime of the nodes, this causes a sync to be triggered every loop.

status:
  conditions:
    - lastTransitionTime: '2024-04-14T12:45:31Z'
      message: Cluster is ready
      reason: Ready
      status: 'True'
      type: Ready
    - lastTransitionTime: '2024-04-14T12:45:30Z'
      message: Cluster is available
      reason: Available
      status: 'True'
      type: Available
    - lastTransitionTime: '2024-04-14T12:45:30Z'
      message: Core nodes is ready
      reason: CoreNodesReady
      status: 'True'
      type: CoreNodesReady
    - lastTransitionTime: '2024-04-14T12:43:38Z'
      message: Core nodes progressing
      reason: CoreNodesProgressing
      status: 'True'
      type: CoreNodesProgressing
  coreNodes:
    - connections: 1
      uptime: 65596542
      version: 5.6.0
    - connections: 1
      uptime: 65719858
      version: 5.6.0
zswanson commented 1 month ago

2.11 with server-side-diff enabled and we randomly today have HPAs reporting their status fields as out of sync.

image

llavaud commented 1 month ago

personally, we now completely ignore status fields with the following 2 parameters:

resource.customizations.ignoreResourceUpdates.all: |
  jsonPointers:
    - /status
resource.compareoptions: |
  ignoreResourceStatusField: all
zswanson commented 1 month ago

yah adding those now too but I thought argocd internally already ignored those fields