Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
e528d2d9
Commit
e528d2d9
authored
Aug 04, 2015
by
Alex Mohr
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #12198 from mesosphere/default-mem-and-cpu-limit
MESOS: Set the cpu+mem default limit in the SchedulerServer
parents
927268e6
191f2def
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
3 deletions
+15
-3
service.go
contrib/mesos/pkg/scheduler/service/service.go
+5
-3
service_test.go
contrib/mesos/pkg/scheduler/service/service_test.go
+10
-0
No files found.
contrib/mesos/pkg/scheduler/service/service.go
View file @
e528d2d9
...
@@ -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
,
...
...
contrib/mesos/pkg/scheduler/service/service_test.go
View file @
e528d2d9
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment