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
402266af
Commit
402266af
authored
Oct 15, 2018
by
Chris O'Haver
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add dns pod memory constraint
parent
c75d772c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
0 deletions
+25
-0
resource_usage_gatherer.go
test/e2e/framework/resource_usage_gatherer.go
+2
-0
density.go
test/e2e/scalability/density.go
+8
-0
load.go
test/e2e/scalability/load.go
+15
-0
No files found.
test/e2e/framework/resource_usage_gatherer.go
View file @
402266af
...
@@ -48,6 +48,8 @@ type SingleContainerSummary struct {
...
@@ -48,6 +48,8 @@ type SingleContainerSummary struct {
// we can't have int here, as JSON does not accept integer keys.
// we can't have int here, as JSON does not accept integer keys.
type
ResourceUsageSummary
map
[
string
][]
SingleContainerSummary
type
ResourceUsageSummary
map
[
string
][]
SingleContainerSummary
const
NoCPUConstraint
=
math
.
MaxFloat64
func
(
s
*
ResourceUsageSummary
)
PrintHumanReadable
()
string
{
func
(
s
*
ResourceUsageSummary
)
PrintHumanReadable
()
string
{
buf
:=
&
bytes
.
Buffer
{}
buf
:=
&
bytes
.
Buffer
{}
w
:=
tabwriter
.
NewWriter
(
buf
,
1
,
0
,
1
,
' '
,
0
)
w
:=
tabwriter
.
NewWriter
(
buf
,
1
,
0
,
1
,
' '
,
0
)
...
...
test/e2e/scalability/density.go
View file @
402266af
...
@@ -224,6 +224,14 @@ func density30AddonResourceVerifier(numNodes int) map[string]framework.ResourceC
...
@@ -224,6 +224,14 @@ func density30AddonResourceVerifier(numNodes int) map[string]framework.ResourceC
CPUConstraint
:
schedulerCPU
,
CPUConstraint
:
schedulerCPU
,
MemoryConstraint
:
schedulerMem
,
MemoryConstraint
:
schedulerMem
,
}
}
constraints
[
"coredns"
]
=
framework
.
ResourceConstraint
{
CPUConstraint
:
framework
.
NoCPUConstraint
,
MemoryConstraint
:
170
*
(
1024
*
1024
),
}
constraints
[
"kubedns"
]
=
framework
.
ResourceConstraint
{
CPUConstraint
:
framework
.
NoCPUConstraint
,
MemoryConstraint
:
170
*
(
1024
*
1024
),
}
return
constraints
return
constraints
}
}
...
...
test/e2e/scalability/load.go
View file @
402266af
...
@@ -232,6 +232,8 @@ var _ = SIGDescribe("Load capacity", func() {
...
@@ -232,6 +232,8 @@ var _ = SIGDescribe("Load capacity", func() {
framework
.
ExpectNoError
(
CreateQuotas
(
f
,
namespaces
,
2
*
totalPods
,
testPhaseDurations
.
StartPhase
(
115
,
"quota creation"
)))
framework
.
ExpectNoError
(
CreateQuotas
(
f
,
namespaces
,
2
*
totalPods
,
testPhaseDurations
.
StartPhase
(
115
,
"quota creation"
)))
}
}
f
.
AddonResourceConstraints
=
loadResourceConstraints
()
serviceCreationPhase
:=
testPhaseDurations
.
StartPhase
(
120
,
"services creation"
)
serviceCreationPhase
:=
testPhaseDurations
.
StartPhase
(
120
,
"services creation"
)
defer
serviceCreationPhase
.
End
()
defer
serviceCreationPhase
.
End
()
if
itArg
.
services
{
if
itArg
.
services
{
...
@@ -429,6 +431,19 @@ func computePodCounts(total int) (int, int, int) {
...
@@ -429,6 +431,19 @@ func computePodCounts(total int) (int, int, int) {
return
smallGroupCount
,
mediumGroupCount
,
bigGroupCount
return
smallGroupCount
,
mediumGroupCount
,
bigGroupCount
}
}
func
loadResourceConstraints
()
map
[
string
]
framework
.
ResourceConstraint
{
constraints
:=
make
(
map
[
string
]
framework
.
ResourceConstraint
)
constraints
[
"coredns"
]
=
framework
.
ResourceConstraint
{
CPUConstraint
:
framework
.
NoCPUConstraint
,
MemoryConstraint
:
170
*
(
1024
*
1024
),
}
constraints
[
"kubedns"
]
=
framework
.
ResourceConstraint
{
CPUConstraint
:
framework
.
NoCPUConstraint
,
MemoryConstraint
:
170
*
(
1024
*
1024
),
}
return
constraints
}
func
generateConfigs
(
func
generateConfigs
(
totalPods
int
,
totalPods
int
,
image
string
,
image
string
,
...
...
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