argoproj / argo-cd

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

ignoreDifferences(jqPathExpressions) weird behavior, wipes code block #16651

Open radomarina opened 11 months ago

radomarina commented 11 months ago

Describe the bug ignoreDifferences(jqPathExpressions) weird behavior, wipes code block (as seen in the screenshot)

To Reproduce add a ignoreDifferences to an Application with Deployment that the image is lasting with 'latest'

ignoreDifferences:
  - group: apps
    kind: Deployment
    jqPathExpressions:
      - '.spec.template.spec.containers[] | select(.image | endswith(":latest"))'

Expected behavior

Should ignore difference of image lasting with 'latest'

Screenshots

image

Version

argocd-server: v2.4.0+91aefab
  BuildDate: 2022-06-10T17:23:37Z
  GitCommit: 91aefabc5b213a258ddcfe04b8e69bb4a2dd2566
  GitTreeState: clean
  GoVersion: go1.18.3
  Compiler: gc
  Platform: linux/amd64
  Kustomize Version: v4.4.1 2021-11-11T23:36:27Z
  Helm Version: v3.8.1+g5cb9af4
  Kubectl Version: v0.23.1
  Jsonnet Version: v0.18.0
andrii-korotkov-verkada commented 1 week ago

ArgoCD versions 2.10 and below have reached EOL. Can you upgrade and let us know if the issue is still present, please?