argoproj / argo-cd

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

DiffIgnoring the only annotation present leads to an empty annotation object which is still different #7513

Open Rafaesp opened 2 years ago

Rafaesp commented 2 years ago

I have the following diff in one of my applications: image

I've added the following ignoreDifferences to my manifest:

ignoreDifferences:
  - group: apps
    kind: Deployment
    jsonPointers:
      - /spec/template/metadata/annotations/kubectl.kubernetes.io~1restartedAt

But the end result is still a difference and the sync status is still OutOfSync. image

Is there a way ArgoCD can handle this case? Thank you

JrCs commented 2 years ago

I think you must add a "fake" annotation so the result is not an empty annotation

nabadger commented 2 years ago

This is causing us a few problems (especially when it happens on lots of apps).

Are there any solutions from argo here (don't really like the idea of having a fake-annotation to work around this).

guiguan commented 3 months ago

Any update on this? This is so annoying