Commit e528d2d9 authored by Alex Mohr's avatar Alex Mohr

Merge pull request #12198 from mesosphere/default-mem-and-cpu-limit

MESOS: Set the cpu+mem default limit in the SchedulerServer
parents 927268e6 191f2def
...@@ -160,9 +160,11 @@ func NewSchedulerServer() *SchedulerServer { ...@@ -160,9 +160,11 @@ func NewSchedulerServer() *SchedulerServer {
Address: util.IP(net.ParseIP("127.0.0.1")), Address: util.IP(net.ParseIP("127.0.0.1")),
FailoverTimeout: time.Duration((1 << 62) - 1).Seconds(), FailoverTimeout: time.Duration((1 << 62) - 1).Seconds(),
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 ( ...@@ -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) { ...@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment