mirror of https://github.com/k3s-io/k3s
Merge pull request #12198 from mesosphere/default-mem-and-cpu-limit
MESOS: Set the cpu+mem default limit in the SchedulerServerpull/6/head
commit
e528d2d948
|
@ -163,6 +163,8 @@ func NewSchedulerServer() *SchedulerServer {
|
||||||
RunProxy: true,
|
RunProxy: true,
|
||||||
ExecutorSuicideTimeout: execcfg.DefaultSuicideTimeout,
|
ExecutorSuicideTimeout: execcfg.DefaultSuicideTimeout,
|
||||||
ExecutorCgroupPrefix: execcfg.DefaultCgroupPrefix,
|
ExecutorCgroupPrefix: execcfg.DefaultCgroupPrefix,
|
||||||
|
DefaultContainerCPULimit: mresource.DefaultDefaultContainerCPULimit,
|
||||||
|
DefaultContainerMemLimit: mresource.DefaultDefaultContainerMemLimit,
|
||||||
|
|
||||||
MinionLogMaxSize: minioncfg.DefaultLogMaxSize(),
|
MinionLogMaxSize: minioncfg.DefaultLogMaxSize(),
|
||||||
MinionLogMaxBackups: minioncfg.DefaultLogMaxBackups,
|
MinionLogMaxBackups: minioncfg.DefaultLogMaxBackups,
|
||||||
|
|
|
@ -28,6 +28,8 @@ import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/archive"
|
"github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/archive"
|
||||||
|
mresource "github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/scheduler/resource"
|
||||||
|
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -115,6 +117,14 @@ func Test_awaitFailoverDoneFailover(t *testing.T) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func Test_DefaultResourceLimits(t *testing.T) {
|
||||||
|
assert := assert.New(t)
|
||||||
|
|
||||||
|
s := NewSchedulerServer()
|
||||||
|
assert.Equal(s.DefaultContainerCPULimit, mresource.DefaultDefaultContainerCPULimit)
|
||||||
|
assert.Equal(s.DefaultContainerMemLimit, mresource.DefaultDefaultContainerMemLimit)
|
||||||
|
}
|
||||||
|
|
||||||
func Test_StaticPods(t *testing.T) {
|
func Test_StaticPods(t *testing.T) {
|
||||||
assert := assert.New(t)
|
assert := assert.New(t)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue