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
eb33d1b1
Commit
eb33d1b1
authored
Aug 21, 2017
by
Irfan Ur Rehman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Federation] Update hpa e2e utils to enable reuse in fed hpa tests
parent
db928095
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
37 additions
and
31 deletions
+37
-31
autoscaling_timer.go
test/e2e/autoscaling/autoscaling_timer.go
+1
-1
horizontal_pod_autoscaling.go
test/e2e/autoscaling/horizontal_pod_autoscaling.go
+1
-1
autoscaling_utils.go
test/e2e/common/autoscaling_utils.go
+31
-27
stackdriver.go
test/e2e/instrumentation/monitoring/stackdriver.go
+1
-1
horizontal_pod_autoscalers.go
test/e2e/upgrades/horizontal_pod_autoscalers.go
+3
-1
No files found.
test/e2e/autoscaling/autoscaling_timer.go
View file @
eb33d1b1
...
...
@@ -89,7 +89,7 @@ var _ = SIGDescribe("[Feature:ClusterSizeAutoscalingScaleUp] [Slow] Autoscaling"
nodeMemoryMB
:=
(
&
nodeMemoryBytes
)
.
Value
()
/
1024
/
1024
memRequestMB
:=
nodeMemoryMB
/
10
// Ensure each pod takes not more than 10% of node's total memory.
replicas
:=
1
resourceConsumer
:=
common
.
NewDynamicResourceConsumer
(
"resource-consumer"
,
common
.
KindDeployment
,
replicas
,
0
,
0
,
0
,
cpuRequestMillis
,
memRequestMB
,
f
)
resourceConsumer
:=
common
.
NewDynamicResourceConsumer
(
"resource-consumer"
,
f
.
Namespace
.
Name
,
common
.
KindDeployment
,
replicas
,
0
,
0
,
0
,
cpuRequestMillis
,
memRequestMB
,
f
.
ClientSet
,
f
.
InternalClientset
)
defer
resourceConsumer
.
CleanUp
()
resourceConsumer
.
WaitForReplicas
(
replicas
,
1
*
time
.
Minute
)
// Should finish ~immediately, so 1 minute is more than enough.
...
...
test/e2e/autoscaling/horizontal_pod_autoscaling.go
View file @
eb33d1b1
...
...
@@ -115,7 +115,7 @@ type HPAScaleTest struct {
// TODO The use of 3 states is arbitrary, we could eventually make this test handle "n" states once this test stabilizes.
func
(
scaleTest
*
HPAScaleTest
)
run
(
name
,
kind
string
,
rc
*
common
.
ResourceConsumer
,
f
*
framework
.
Framework
)
{
const
timeToWait
=
15
*
time
.
Minute
rc
=
common
.
NewDynamicResourceConsumer
(
name
,
kind
,
int
(
scaleTest
.
initPods
),
int
(
scaleTest
.
totalInitialCPUUsage
),
0
,
0
,
scaleTest
.
perPodCPURequest
,
200
,
f
)
rc
=
common
.
NewDynamicResourceConsumer
(
name
,
f
.
Namespace
.
Name
,
kind
,
int
(
scaleTest
.
initPods
),
int
(
scaleTest
.
totalInitialCPUUsage
),
0
,
0
,
scaleTest
.
perPodCPURequest
,
200
,
f
.
ClientSet
,
f
.
InternalClientset
)
defer
rc
.
CleanUp
()
hpa
:=
common
.
CreateCPUHorizontalPodAutoscaler
(
rc
,
scaleTest
.
targetCPUUtilizationPercent
,
scaleTest
.
minPods
,
scaleTest
.
maxPods
)
defer
common
.
DeleteHorizontalPodAutoscaler
(
rc
,
hpa
.
Name
)
...
...
test/e2e/common/autoscaling_utils.go
View file @
eb33d1b1
This diff is collapsed.
Click to expand it.
test/e2e/instrumentation/monitoring/stackdriver.go
View file @
eb33d1b1
...
...
@@ -87,7 +87,7 @@ func testStackdriverMonitoring(f *framework.Framework, pods, allPodsCPU int, per
framework
.
ExpectNoError
(
err
)
rc
:=
common
.
NewDynamicResourceConsumer
(
rcName
,
common
.
KindDeployment
,
pods
,
allPodsCPU
,
memoryUsed
,
0
,
perPodCPU
,
memoryLimit
,
f
)
rc
:=
common
.
NewDynamicResourceConsumer
(
rcName
,
f
.
Namespace
.
Name
,
common
.
KindDeployment
,
pods
,
allPodsCPU
,
memoryUsed
,
0
,
perPodCPU
,
memoryLimit
,
f
.
ClientSet
,
f
.
InternalClientset
)
defer
rc
.
CleanUp
()
rc
.
WaitForReplicas
(
pods
,
15
*
time
.
Minute
)
...
...
test/e2e/upgrades/horizontal_pod_autoscalers.go
View file @
eb33d1b1
...
...
@@ -39,6 +39,7 @@ func (HPAUpgradeTest) Name() string { return "hpa-upgrade" }
func
(
t
*
HPAUpgradeTest
)
Setup
(
f
*
framework
.
Framework
)
{
t
.
rc
=
common
.
NewDynamicResourceConsumer
(
"res-cons-upgrade"
,
f
.
Namespace
.
Name
,
common
.
KindRC
,
1
,
/* replicas */
250
,
/* initCPUTotal */
...
...
@@ -46,7 +47,8 @@ func (t *HPAUpgradeTest) Setup(f *framework.Framework) {
0
,
500
,
/* cpuLimit */
200
,
/* memLimit */
f
)
f
.
ClientSet
,
f
.
InternalClientset
)
t
.
hpa
=
common
.
CreateCPUHorizontalPodAutoscaler
(
t
.
rc
,
20
,
/* targetCPUUtilizationPercent */
...
...
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