-
Notifications
You must be signed in to change notification settings - Fork 78
feat: add Queue weight range [1-65535], default 1 #157
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: add Queue weight range [1-65535], default 1 #157
Conversation
/assign @kevin-wangzefeng |
@@ -346,6 +346,9 @@ type NodeGroupAntiAffinity struct { | |||
// QueueSpec represents the template of Queue. | |||
type QueueSpec struct { | |||
// +optional | |||
// +kubebuilder:default:=1 |
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.
Setting default value:
https://github.com/volcano-sh/volcano/blob/master/pkg/cli/queue/create.go#L46
and Default Queue weight is 1
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.
PR Overview
This PR implements validation for the Queue weight by adding kubebuilder annotations, enforcing the intended weight range and default value.
- Adds a default value of 1 for the Queue weight
- Implements validation annotations to restrict the Queue weight value
Reviewed Changes
File | Description |
---|---|
pkg/apis/scheduling/v1beta1/types.go | Added kubebuilder annotations to the QueueSpec.Weight field to enforce a default and a value range |
Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.
6e4923c
to
67d2652
Compare
Signed-off-by: dongjiang <[email protected]> Co-Authored-By: Copilot <[email protected]>
67d2652
to
5a15527
Compare
/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: kevin-wangzefeng 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 |
fix Queue weight setting negative number, like
-2