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

Rollback in Argo CD Removes ServerSideApply=true from syncPolicy Configuration #20183

Open bender92 opened 1 month ago

bender92 commented 1 month ago

Checklist:

Describe the bug We are experiencing an issue with Argo CD where rolling back an application unexpectedly alters our syncPolicy setup, specifically losing the ServerSideApply=true option.

Current Setup:

syncPolicy:
  automated: {}
  syncOptions:
    - ServerSideApply=true

After performing a rollback, we observe:

syncPolicy: {}

This prevents us from applying previous ConfigMaps as expected because the ServerSideApply flag is necessary for large ConfigMaps.

Additional Observations:

When testing rollbacks with syncPolicy:

syncPolicy:
  syncOptions:
    - ServerSideApply=true

and with auto-sync disabled, ArgoCD does not reset syncOptions, leading to a successful rollback.

To Reproduce Configure an Argo CD application with the following syncPolicy:

syncPolicy:
  automated: {}
  syncOptions:
    - ServerSideApply=true

Perform a rollback to a previous version of the application via the Argo CD UI or CLI.

Observe that the resultant configuration is missing syncOptions.

syncPolicy: {}

Expected behavior After rollback, the syncPolicy should remain:

syncPolicy:
  syncOptions:
    - ServerSideApply=true

Version Taken from UI

v2.9.0+9cf0c69
nueavv commented 1 month ago

I tested it on my ArgoCD, version 2.13.0, but I couldn't reproduce the issue.

agaudreault commented 1 month ago

@bender92 can you provide more information, or perhaps try on 2.13 version

bender92 commented 1 week ago

Hello, we have option to test it only on v2.12.6 and almost the same result , but one change what I've noticed, syncPolicy fully disappeared form manifest