-
Notifications
You must be signed in to change notification settings - Fork 23
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
feat: scheduler (11/): add more scheduler logic #413
feat: scheduler (11/): add more scheduler logic #413
Conversation
) (toCreate, toUpdate, toDelete []*fleetv1beta1.ClusterResourceBinding, err error) { | ||
// Pre-allocate with a reasonable capacity. | ||
toCreate = make([]*fleetv1beta1.ClusterResourceBinding, 0, len(picked)) | ||
toUpdate = make([]*fleetv1beta1.ClusterResourceBinding, 0, 20) |
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.
curious why 20?
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.
Hi Ryan! It's just a number that's larger enough than the max. number of clusters in use by most interviewees as reported by the CNCF survey (10 IRC) but not too large to over-allocate memory. The reason it's added here is that it feels a little bit overkill to do some counting just for the purpose of allocating arrays.
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.
LTGM :)
dcb1707
to
2e07966
Compare
Description of your changes
This PR is part of the PRs that implement the Fleet workload scheduling.
It features more scheduling logic for PickAll type CRPs.
I have:
make reviewable
to ensure this PR is ready for review.How has this code been tested
Special notes for your reviewer
To control the size of the PR, certain unit tests are not checked in; they will be sent in a separate PR.