mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-14 22:33:34 +00:00
Merge pull request #12198 from mesosphere/default-mem-and-cpu-limit
MESOS: Set the cpu+mem default limit in the SchedulerServer
This commit is contained in:
commit
e528d2d948
@ -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 (
|
|||||||
"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
Block a user