-
Notifications
You must be signed in to change notification settings - Fork 24
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): support optional cpu constraints and make sort by guest count optional #50
base: main
Are you sure you want to change the base?
Conversation
eed199b
to
d73b246
Compare
Thanks for your PR, We will check this. |
d73b246
to
907a291
Compare
@@ -78,6 +78,15 @@ type SchedulerHints struct { | |||
// By default 100% of a node's memory will be used for allocation. | |||
// +optional | |||
MemoryAdjustment *uint64 `json:"memoryAdjustment,omitempty"` | |||
|
|||
// Like MemoryAdjustment, but for CPU resources. |
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.
Please write a meaningful description here.
Re-explain the adjustment term here as well.
// +optional | ||
CPUAdjustment *uint64 `json:"cpuAdjustment,omitempty"` | ||
|
||
// +optional |
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.
Here we also need a description and why this is needed.
requested uint64 | ||
// InsufficientResourcesError is used when the scheduler cannot assign a VM to a node because no node | ||
// would be able to provide the requested resources. | ||
type InsufficientResourcesError struct { |
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.
I guess its better to separate the error by CPU, Memory.
This optionally allows the scheduler to take CPU cores into account, as well as disabling the sorting by guest count. I think with this it should be relatively simple, to, for example, include a host's actual cpu load as well.