-
Notifications
You must be signed in to change notification settings - Fork 960
fix deployment replicas syncer in case that status.replicas
haven't been collected from member cluster to template
#4729
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
Conversation
@XiShanYongYe-Chang @chaunceyjiang can you review on this? thanks very much for your precious time! |
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #4729 +/- ##
==========================================
- Coverage 51.78% 51.77% -0.02%
==========================================
Files 250 250
Lines 25000 24993 -7
==========================================
- Hits 12947 12940 -7
Misses 11343 11343
Partials 710 710
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
pkg/controllers/deploymentreplicassyncer/deployment_replicas_syncer_controller.go
Outdated
Show resolved
Hide resolved
/kind flake |
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
pkg/controllers/deploymentreplicassyncer/deployment_replicas_syncer_controller.go
Outdated
Show resolved
Hide resolved
the max backoff time of workqueue is 1000s @RainbowMango karmada/pkg/sharedcli/ratelimiterflag/ratelimiterflag.go Lines 42 to 48 in 13dafc6
|
The resource key should be able to re-queue infinitely many times, it's just that the maximum allowed backoff time is 1000s. |
"status": {}
status.replicas
haven't been collected from member cluster to template
7bcb400
to
cd6b82e
Compare
…een collected Signed-off-by: chaosi-zju <chaosi@zju.edu.cn>
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.
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: RainbowMango The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
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
What type of PR is this?
/kind bug
What this PR does / why we need it:
This PR mainly handles two problem:
1、Problem 1
we should make sure the latest collected status.replicas is synced from binding to template.
e.g: user set deployment.spec.replicas = 2, then sum replicas in binding.status becomes 2, however, if now deployment.status.replicas is still 1, we shouldn't update spec.replicas to 1 until status.replicas becomes 2.
2、Problem 2
as described in #4758, fix deployment replicas syncer in case that the
status.replicas
inaggregatedStatus
of binding is 0.actually, if member cluster deployment is controlled by hpa, its status.replicas must > 0 (since hpa.minReplicas > 0),
so, if its
status.replicas
is 0, means the status haven't been collected from member cluster, and needs waiting before do the following update.Which issue(s) this PR fixes:
Fixes #4758
Special notes for your reviewer:
bugfix for #4707
Does this PR introduce a user-facing change?: