Skip to content

Commit 0fbf87e

Browse files
authored
apis: fix type of MinResources in podgroup (#2212)
Signed-off-by: 佑祎 <zzw261520@alibaba-inc.com>
1 parent c6cddf3 commit 0fbf87e

File tree

4 files changed

+8
-11
lines changed

4 files changed

+8
-11
lines changed

apis/thirdparty/scheduler-plugins/pkg/apis/scheduling/v1alpha1/types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ type PodGroupSpec struct {
146146
// MinResources defines the minimal resource of members/tasks to run the pod group;
147147
// if there's not enough resources to start all tasks, the scheduler
148148
// will not start anyone.
149-
MinResources *v1.ResourceList `json:"minResources,omitempty"`
149+
MinResources v1.ResourceList `json:"minResources,omitempty"`
150150

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

apis/thirdparty/scheduler-plugins/pkg/apis/scheduling/v1alpha1/zz_generated.deepcopy.go

Lines changed: 5 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/scheduler/plugins/coscheduling/core/core_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ func NewManagerForTest() *Mgr {
6666
}
6767
}
6868

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

pkg/scheduler/plugins/coscheduling/coscheduling_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ func newTestSharedLister(pods []*corev1.Pod, nodes []*corev1.Node) *testSharedLi
133133
}
134134
}
135135

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

0 commit comments

Comments
 (0)