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

fix: Add sync waves to Redis resources and config maps (#19798) #20946

Conversation

andrii-korotkov-verkada
Copy link
Contributor

Fixes #19798

Some Redis stuff needs to be updated before others, same for config maps. That's relevant when managing ArgoCD with ArgoCD.

Needs to be cherry-picked to v2.11-v2.13

Checklist:

  • Either (a) I've created an enhancement proposal and discussed it with the community, (b) this is a bug fix, or (c) this does not need to be in the release notes.
  • The title of the PR states what changed and the related issues number (used for the release note).
  • The title of the PR conforms to the Toolchain Guide
  • I've included "Closes [ISSUE #]" or "Fixes [ISSUE #]" in the description to automatically close the associated issue.
  • I've updated both the CLI and UI to expose my feature, or I plan to submit a second PR with them.
  • Does this PR require documentation updates?
  • I've updated documentation as required by this PR.
  • I have signed off all my commits as required by DCO
  • I have written unit and/or e2e tests for my change. PRs without these are unlikely to be merged.
  • My build is green (troubleshooting builds).
  • My new feature complies with the feature status guidelines.
  • I have added a brief description of why this PR is necessary and/or what this PR solves.
  • Optional. My organization is added to USERS.md.
  • Optional. For bug fixes, I've indicated what older releases this fix should be cherry-picked into (this may or may not happen depending on risk/complexity).

Fixes argoproj#19798

Some Redis stuff needs to be updated before others, same for config maps. That's relevant when managing ArgoCD with ArgoCD.

Needs to be cherry-picked to v2.11-v2.13

Signed-off-by: Andrii Korotkov <[email protected]>
@andrii-korotkov-verkada andrii-korotkov-verkada requested a review from a team as a code owner November 25, 2024 14:37
Copy link

bunnyshell bot commented Nov 25, 2024

❌ Preview Environment deleted from Bunnyshell

Available commands (reply to this comment):

  • 🚀 /bns:deploy to deploy the environment

@crenshaw-dev
Copy link
Member

We should do this in a way that's tool-agnostic and favors eventual consistency over explicit ordering.

@andrii-korotkov-verkada
Copy link
Contributor Author

But it's blocking or messing up with people who try to upgrade to v2.12/2.13 from earlier. Maybe we messed up how we reconfigured Redis, but config maps would be tricky too, since we'd probably need hot reloading if cms and deployments are in the same sync wave.

@crenshaw-dev
Copy link
Member

Yep, understood. So we need a solution that works regardless of whether you deploy Argo CD using Argo CD or a different tool.

@andrii-korotkov-verkada
Copy link
Contributor Author

I don't know an easy way. I can think of direct kubectl apply, which seems to handle this ordering well and ArgoCD, which needs sync waves. What other tools do you have in mind? How do they order?

If you wanna support all possible tools, we probably can't get around of hot reloading or using reloader for pods when cms are updated etc.

Can we merge this PR as a hotfix and work on a better solution separately? I'm just not sure how much it'd take.

@andrii-korotkov-verkada
Copy link
Contributor Author

That's one tool we can try to use https://github.com/stakater/Reloader.

@crenshaw-dev
Copy link
Member

Have you confirmed that kubectl apply escapes this issue? I can't think of a way it could avoid the race condition. Flux, Helm, and ConfigSync would be examples of tools which would not be helped by Argo CD sync waves.

We shouldn't merge this. Temporary fixes have a way of lasting forever.

Reloader isn't really an option. We shouldn't require an external tool to get Argo CD running.

I'm confused by the original bug. Why is argocd-redis not synced when the controller is synced? Is OP using a partial sync?

@andrii-korotkov-verkada
Copy link
Contributor Author

I've been upgrading with kubectl and I think it was okay.

@andrii-korotkov-verkada andrii-korotkov-verkada deleted the 19798-add-sync-waves-to-redis branch November 25, 2024 15:06
Copy link

codecov bot commented Nov 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 55.02%. Comparing base (32cc663) to head (c4045f6).
Report is 14 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #20946      +/-   ##
==========================================
- Coverage   55.04%   55.02%   -0.02%     
==========================================
  Files         324      324              
  Lines       55421    55465      +44     
==========================================
+ Hits        30504    30520      +16     
- Misses      22303    22326      +23     
- Partials     2614     2619       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants