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
bugfixs of dependencies distributor #1499
bugfixs of dependencies distributor #1499
Conversation
…r clusters Signed-off-by: lihanbo <lihanbo2@huawei.com>
Signed-off-by: lihanbo <lihanbo2@huawei.com>
|
To reproduce bug: enqueue the resource binding that has been scheduled to member clusters
|
To reproduce bug: update Resource info when update attached bindings.
|
// prevent newBindingObject from the queue if it's not in Scheduled condition | ||
if !helper.IsBindingScheduled(&newBindingObject.Status) { | ||
// prevent newBindingObject from the queue if it's not scheduled yet. | ||
if len(oldBindingObject.Spec.Clusters) == 0 && len(newBindingObject.Spec.Clusters) == 0 { |
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.
When len(oldBindingObject.Spec.Clusters) == 0
and len(newBindingObject.Spec.Clusters) != 0
, does it also need to be added to the queue?
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.
When
len(oldBindingObject.Spec.Clusters) == 0
andlen(newBindingObject.Spec.Clusters) != 0
, does it also need to be added to the queue?
When len(oldBindingObject.Spec.Clusters) == 0 and len(newBindingObject.Spec.Clusters) != 0, it means the resource will be scheduled to some clusters, and it need to be enqueued so that dependencies distributor will propagate its dependencies to the same clusters.
When len(oldBindingObject.Spec.Clusters) != 0 and len(newBindingObject.Spec.Clusters) == 0, it means the resource has been scheduled to some clusters and now be deleted, and it need to be enqueued so that dependencies distributor will remove its dependencies from the clusters.
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
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 |
Hi @mrlihanbo , please check-pick this patch to Here is the script you can leverage: https://github.com/karmada-io/karmada/blob/master/hack/cherry_pick_pull.sh |
…9-upstream-release-1.1 Automated cherry pick of #1499: bugfix: enqueue the resource binding that has been
What type of PR is this?
/kind bug
What this PR does / why we need it:
Bugfixs of dependencies distributor :
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?: