-
Notifications
You must be signed in to change notification settings - Fork 548
add validate for NodeResourcesAllocatable and Coscheduling plugin #888
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
base: master
Are you sure you want to change the base?
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: googs1025 The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
✅ Deploy Preview for kubernetes-sigs-scheduler-plugins canceled.
|
Signed-off-by: googs1025 <[email protected]>
51d9d8d
to
4d175be
Compare
/assign @Huang-Wei |
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.
overall seems OK, some inline comments
var supportNodeResourcesMode = sets.NewString( | ||
string(config.Least), | ||
string(config.Most), | ||
) |
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.
this should probably be done in init
or similar initialization function
string(config.Most), | ||
) | ||
|
||
func validateNodeResourcesModeType(mode config.ModeType, path *field.Path) *field.Error { |
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.
if ModeType
is an enum-like type (is it right?) how can it be different than the enumerated value? isn't the golang type system preventing this?
v1 "k8s.io/api/core/v1" | ||
"k8s.io/apimachinery/pkg/runtime" | ||
"k8s.io/klog/v2" | ||
schedulerconfig "k8s.io/kubernetes/pkg/scheduler/apis/config" | ||
"k8s.io/kubernetes/pkg/scheduler/framework" | ||
|
||
"math" |
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.
why moving the import?
What type of PR is this?
/kind feature
/kind cleanup
What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #887
Special notes for your reviewer:
Does this PR introduce a user-facing change?