Skip to content

Commit

Permalink
apis: fix type of MinResources in podgroup (#2212)
Browse files Browse the repository at this point in the history
Signed-off-by: 佑祎 <[email protected]>
  • Loading branch information
zwzhang0107 authored Sep 24, 2024
1 parent c6cddf3 commit 0fbf87e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ type PodGroupSpec struct {
// MinResources defines the minimal resource of members/tasks to run the pod group;
// if there's not enough resources to start all tasks, the scheduler
// will not start anyone.
MinResources *v1.ResourceList `json:"minResources,omitempty"`
MinResources v1.ResourceList `json:"minResources,omitempty"`

// ScheduleTimeoutSeconds defines the maximal time of members/tasks to wait before run the pod group;
ScheduleTimeoutSeconds *int32 `json:"scheduleTimeoutSeconds,omitempty"`
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/scheduler/plugins/coscheduling/core/core_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ func NewManagerForTest() *Mgr {
}
}

func makePg(name, namespace string, min int32, creationTime *time.Time, minResource *corev1.ResourceList) *v1alpha1.PodGroup {
func makePg(name, namespace string, min int32, creationTime *time.Time, minResource corev1.ResourceList) *v1alpha1.PodGroup {
var ti int32 = 10
pg := &v1alpha1.PodGroup{
ObjectMeta: metav1.ObjectMeta{Name: name, Namespace: namespace},
Expand Down
2 changes: 1 addition & 1 deletion pkg/scheduler/plugins/coscheduling/coscheduling_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ func newTestSharedLister(pods []*corev1.Pod, nodes []*corev1.Node) *testSharedLi
}
}

func makePg(name, namespace string, min int32, creationTime *time.Time, minResource *corev1.ResourceList) *v1alpha1.PodGroup {
func makePg(name, namespace string, min int32, creationTime *time.Time, minResource corev1.ResourceList) *v1alpha1.PodGroup {
var ti int32 = 10
pg := &v1alpha1.PodGroup{
ObjectMeta: metav1.ObjectMeta{Name: name, Namespace: namespace},
Expand Down

0 comments on commit 0fbf87e

Please sign in to comment.