-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
refactor: Replace status.observedAt
with redis pub/sub channels for resource tree updates (#1340)
#4208
Conversation
0364358
to
593ae01
Compare
… resource tree updates (argoproj#1340)
593ae01
to
628da9d
Compare
Codecov Report
@@ Coverage Diff @@
## master #4208 +/- ##
==========================================
- Coverage 42.98% 42.84% -0.14%
==========================================
Files 124 124
Lines 18332 18377 +45
==========================================
- Hits 7880 7874 -6
- Misses 9438 9492 +54
+ Partials 1014 1011 -3
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, quite awesome fix!
The cache is throwaway in the current implementation, we can delete it and nothing will break. Will that change by this patch? |
@darshanime , it is still safe to lose cache. Redis recreates pub-sub channel on the fly. Also |
Closes #1340
More information about why this PR is required now:
The Application CRD status has two fields
observedAt
andreconciledAt
.reconciledAt
is updated when application resources are compared with Git and sync/health status got refreshed.observedAt
is updated every time whenreconciledAt
is updated and when any "child" application resource (e.g. Pod, ReplicaSet etc) has changed.The
observedAt
is changed very frequently and change is required just to notify UI that it should reload resources tree. If Argo CD manages thousands of application thenobservedAt
field updates cause thousands of K8S PATCH requests every minute. This slowdown K8S API server and affects all controllers installed in the cluster.This PR deprecates
observedAt
- controller no longer updates it. The UI is using/v1/stream/applications/<app-name>/resource-tree
stream API which is powered by redis pub-sub.