Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
bender92 opened this issue Oct 1, 2024 · 5 comments · May be fixed by #21871
Open

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

bender92 opened this issue Oct 1, 2024 · 5 comments · May be fixed by #21871
Labels
bug Something isn't working component:application-controller component:server-side-apply component:sync more-information-needed Further information is requested version:EOL Latest confirmed affected version has reached EOL

Comments

@bender92
Copy link

bender92 commented Oct 1, 2024

Checklist:

  • [*] I've searched in the docs and FAQ for my answer: https://bit.ly/argocd-faq.
  • [*] I've included steps to reproduce the bug.
  • [*] I've pasted the output of argocd version.

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
@bender92 bender92 added the bug Something isn't working label Oct 1, 2024
@nueavv
Copy link
Member

nueavv commented Oct 4, 2024

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

@agaudreault
Copy link
Member

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

@andrii-korotkov-verkada andrii-korotkov-verkada added more-information-needed Further information is requested version:EOL Latest confirmed affected version has reached EOL labels Nov 11, 2024
@bender92
Copy link
Author

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

@alexef
Copy link
Member

alexef commented Feb 12, 2025

cc: @lidijac I believe this is the issue we're seeing in argo-apps

alexef added a commit to alexef/argo-cd that referenced this issue Feb 13, 2025
a rollback initiatiated from the UI shouldn't wipe out syncOptions if set

Signed-off-by: Alex Eftimie <[email protected]>
@alexef alexef linked a pull request Feb 13, 2025 that will close this issue
14 tasks
@alexef
Copy link
Member

alexef commented Feb 13, 2025

note, the only way to reproduce this is to begin rollback from the state of "Auto Sync" from the UI.

If auto-sync is already disabled, then the syncOptions are preserved by rollback.

Making a tiny change in #21871 that will preserve the syncOptions during rollback

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working component:application-controller component:server-side-apply component:sync more-information-needed Further information is requested version:EOL Latest confirmed affected version has reached EOL
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants