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

update the ClustersPerDecisionGroup explanation #253

Conversation

haoqing0110
Copy link
Member

@haoqing0110 haoqing0110 commented Jul 18, 2023

  1. update the ClustersPerDecisionGroup explanation
  2. add validation for ClustersPerDecisionGroup, 0 and 0% is not allowed.

Signed-off-by: haoqing0110 <qhao@redhat.com>
@openshift-ci openshift-ci bot requested review from deads2k and qiujian16 July 18, 2023 09:48
@haoqing0110
Copy link
Member Author

/assign @qiujian16 @serngawy

@openshift-ci openshift-ci bot added the lgtm label Jul 18, 2023
cluster/v1beta1/types_placement.go Outdated Show resolved Hide resolved
cluster/v1beta1/types_placement.go Outdated Show resolved Hide resolved
@@ -126,8 +126,15 @@ type GroupStrategy struct {
// The percentage will divide the placementDecisions to decisionGroups each group has max number of clusters based on the total num of selected clusters and percentage.
// ex; for a total 100 clusters selected, ClustersPerDecisionGroup equal to 20% will divide the placement decision to 5 groups each group should have 20 clusters.
// Default is having all clusters in a single group.
// If the DecisionGroups field defined, it will be considered first to create the decisionGroups then the ClustersPerDecisionGroup will be used to determine the rest of decisionGroups.
//
// If the DecisionGroups field defined, it will be considered first to create the decisionGroups. The remaining of clusters will then be divided to decisionGroups based on ClustersPerDecisionGroup.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// If the DecisionGroups field defined, it will be considered first to create the decisionGroups. The remaining of clusters will then be divided to decisionGroups based on ClustersPerDecisionGroup.
// Decision groups will be constructed based on the DecisionGroups field at first. The clusters not included in the DecisionGroups will be divided to other decision groups afterwards. Each decision group should not have the number of clusters larger than the ClustersPerDecisionGroup.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this doc should be put on groupStrategy field rather than here. for ClustersPerDecisionGroup, we just need to doc that it is the max number of clusters a group should have.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved this part to groupStrategy field.

@openshift-ci openshift-ci bot removed the lgtm label Jul 18, 2023
Co-authored-by: Jian Qiu <jqiu@redhat.com>
Signed-off-by: haoqing0110 <qhao@redhat.com>
@openshift-ci openshift-ci bot added the lgtm label Jul 19, 2023
@serngawy
Copy link
Member

sound good to me

@qiujian16
Copy link
Member

/approve
/lgtm

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 20, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: haoqing0110, qiujian16, serngawy

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-robot openshift-merge-robot merged commit 0336f23 into open-cluster-management-io:main Jul 20, 2023
7 checks passed
@haoqing0110 haoqing0110 deleted the br_placement-decision branch July 20, 2023 02:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants