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
8a052580
Commit
8a052580
authored
May 31, 2016
by
gmarek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Merge pull request #26356 from kubernetes/revert-25752-resource-limits"
This reverts commit
60c2ab49
, reversing changes made to
965e8dce
.
parent
ea07d310
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
66 additions
and
2 deletions
+66
-2
density.go
test/e2e/density.go
+66
-2
No files found.
test/e2e/density.go
View file @
8a052580
...
...
@@ -50,7 +50,57 @@ const (
// Maximum container failures this test tolerates before failing.
var
MaxContainerFailures
=
0
func
density30AddonResourceVerifier
()
map
[
string
]
framework
.
ResourceConstraint
{
func
density30AddonResourceVerifier
(
numNodes
int
)
map
[
string
]
framework
.
ResourceConstraint
{
var
apiserverMem
uint64
var
controllerMem
uint64
var
schedulerMem
uint64
apiserverCPU
:=
math
.
MaxFloat32
apiserverMem
=
math
.
MaxUint64
controllerCPU
:=
math
.
MaxFloat32
controllerMem
=
math
.
MaxUint64
schedulerCPU
:=
math
.
MaxFloat32
schedulerMem
=
math
.
MaxUint64
if
framework
.
ProviderIs
(
"kubemark"
)
{
if
numNodes
<=
5
{
apiserverCPU
=
0.15
apiserverMem
=
150
*
(
1024
*
1024
)
controllerCPU
=
0.1
controllerMem
=
100
*
(
1024
*
1024
)
schedulerCPU
=
0.05
schedulerMem
=
50
*
(
1024
*
1024
)
}
else
if
numNodes
<=
100
{
apiserverCPU
=
1.5
apiserverMem
=
1500
*
(
1024
*
1024
)
controllerCPU
=
0.75
controllerMem
=
750
*
(
1024
*
1024
)
schedulerCPU
=
0.75
schedulerMem
=
500
*
(
1024
*
1024
)
}
else
if
numNodes
<=
500
{
apiserverCPU
=
2.25
apiserverMem
=
2500
*
(
1024
*
1024
)
controllerCPU
=
1.0
controllerMem
=
1100
*
(
1024
*
1024
)
schedulerCPU
=
0.8
schedulerMem
=
500
*
(
1024
*
1024
)
}
else
if
numNodes
<=
1000
{
apiserverCPU
=
4
apiserverMem
=
4000
*
(
1024
*
1024
)
controllerCPU
=
3
controllerMem
=
2000
*
(
1024
*
1024
)
schedulerCPU
=
1.5
schedulerMem
=
750
*
(
1024
*
1024
)
}
}
else
{
if
numNodes
<=
100
{
apiserverCPU
=
1.5
apiserverMem
=
1300
*
(
1024
*
1024
)
controllerCPU
=
0.5
controllerMem
=
300
*
(
1024
*
1024
)
schedulerCPU
=
0.4
schedulerMem
=
150
*
(
1024
*
1024
)
}
}
constraints
:=
make
(
map
[
string
]
framework
.
ResourceConstraint
)
constraints
[
"fluentd-elasticsearch"
]
=
framework
.
ResourceConstraint
{
CPUConstraint
:
0.2
,
...
...
@@ -81,6 +131,18 @@ func density30AddonResourceVerifier() map[string]framework.ResourceConstraint {
CPUConstraint
:
2
,
MemoryConstraint
:
500
*
(
1024
*
1024
),
}
constraints
[
"kube-apiserver"
]
=
framework
.
ResourceConstraint
{
CPUConstraint
:
apiserverCPU
,
MemoryConstraint
:
apiserverMem
,
}
constraints
[
"kube-controller-manager"
]
=
framework
.
ResourceConstraint
{
CPUConstraint
:
controllerCPU
,
MemoryConstraint
:
controllerMem
,
}
constraints
[
"kube-scheduler"
]
=
framework
.
ResourceConstraint
{
CPUConstraint
:
schedulerCPU
,
MemoryConstraint
:
schedulerMem
,
}
return
constraints
}
...
...
@@ -161,6 +223,9 @@ var _ = framework.KubeDescribe("Density", func() {
nodes
:=
framework
.
GetReadySchedulableNodesOrDie
(
c
)
nodeCount
=
len
(
nodes
.
Items
)
Expect
(
nodeCount
)
.
NotTo
(
BeZero
())
if
nodeCount
==
30
{
f
.
AddonResourceConstraints
=
func
()
map
[
string
]
framework
.
ResourceConstraint
{
return
density30AddonResourceVerifier
(
nodeCount
)
}()
}
nodeCpuCapacity
=
nodes
.
Items
[
0
]
.
Status
.
Allocatable
.
Cpu
()
.
MilliValue
()
nodeMemCapacity
=
nodes
.
Items
[
0
]
.
Status
.
Allocatable
.
Memory
()
.
Value
()
...
...
@@ -213,7 +278,6 @@ var _ = framework.KubeDescribe("Density", func() {
switch
testArg
.
podsPerNode
{
case
30
:
name
=
"[Feature:Performance] "
+
name
f
.
AddonResourceConstraints
=
density30AddonResourceVerifier
()
case
95
:
name
=
"[Feature:HighDensityPerformance]"
+
name
default
:
...
...
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