argoproj / argo-cd

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

PodDisruptionBudget not syncing with RespectIgnoreDifferences flag #18232

Open zawistowskipiotr opened 2 weeks ago

zawistowskipiotr commented 2 weeks ago

Checklist:

Describe the bug

When syncing an application with out of sync status of object PDB and set RespectIgnoreDifferences flag to true - object remains out of sync with status successfully synced.

To Reproduce

Sync application with PDB object with status out of sync and set RespectIgnoreDifferences flag to true.

Expected behavior

PDB object is synced

Screenshots

Zrzut ekranu 2024-05-15 133425 Zrzut ekranu 2024-05-15 133556

Version

argocd: v2.11.0+d3f33c0
  BuildDate: 2024-05-07T16:01:41Z
  GitCommit: d3f33c00197e7f1d16f2a73ce1aeced464b07175
  GitTreeState: clean
  GoVersion: go1.21.9
  Compiler: gc
  Platform: linux/amd64

Logs

None during the operation.

jannfis commented 2 weeks ago

Have you observed that only for PodDisruptionBudgets or also for other type of resources?

zawistowskipiotr commented 2 weeks ago

@jannfis Only for PodDisruptionBudgets

joaosilva15 commented 2 weeks ago

Hey 👋 we also observed this issue. To fix it we tried using server-side apply and it did not change the behaviour. Only editing the resource fixed the issue. Argo version

{
    "Version": "v2.10.6+d504d2b",
    "BuildDate": "2024-04-05T00:27:47Z",
    "GitCommit": "d504d2b1d92f0cf831a124a5fd1a96ee29fa7679",
    "GitTreeState": "clean",
    "GoVersion": "go1.21.3",
    "Compiler": "gc",
    "Platform": "linux/amd64",
    "KustomizeVersion": "v5.2.1 2023-10-19T20:13:51Z",
    "HelmVersion": "v3.14.3+gf03cc04",
    "KubectlVersion": "v0.26.11",
    "JsonnetVersion": "v0.20.0"
}

I had never seen this behaviour previous to 2.10 but we did not test a downgrade to see if it fixes the problem

Edit: We only saw this happening when the diffs were in the matcher labels