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
8be25aaa
Unverified
Commit
8be25aaa
authored
Oct 23, 2018
by
k8s-ci-robot
Committed by
GitHub
Oct 23, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #70125 from jbartosik/e2e-deflake
Deflake e2e tests of HPA
parents
83d3f703
e2394bd3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
horizontal_pod_autoscaling.go
test/e2e/autoscaling/horizontal_pod_autoscaling.go
+8
-8
No files found.
test/e2e/autoscaling/horizontal_pod_autoscaling.go
View file @
8be25aaa
...
...
@@ -96,8 +96,8 @@ var _ = SIGDescribe("[HPA] Horizontal pod autoscaling (scale resource: CPU)", fu
// HPAScaleTest struct is used by the scale(...) function.
type
HPAScaleTest
struct
{
initPods
int
32
totalInitialCPUUsage
int
32
initPods
int
totalInitialCPUUsage
int
perPodCPURequest
int64
targetCPUUtilizationPercent
int32
minPods
int32
...
...
@@ -116,7 +116,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
string
,
kind
schema
.
GroupVersionKind
,
rc
*
common
.
ResourceConsumer
,
f
*
framework
.
Framework
)
{
const
timeToWait
=
15
*
time
.
Minute
rc
=
common
.
NewDynamicResourceConsumer
(
name
,
f
.
Namespace
.
Name
,
kind
,
int
(
scaleTest
.
initPods
),
int
(
scaleTest
.
totalInitialCPUUsage
)
,
0
,
0
,
scaleTest
.
perPodCPURequest
,
200
,
f
.
ClientSet
,
f
.
InternalClientset
,
f
.
ScalesGetter
)
rc
=
common
.
NewDynamicResourceConsumer
(
name
,
f
.
Namespace
.
Name
,
kind
,
scaleTest
.
initPods
,
scaleTest
.
totalInitialCPUUsage
,
0
,
0
,
scaleTest
.
perPodCPURequest
,
200
,
f
.
ClientSet
,
f
.
InternalClientset
,
f
.
ScalesGetter
)
defer
rc
.
CleanUp
()
hpa
:=
common
.
CreateCPUHorizontalPodAutoscaler
(
rc
,
scaleTest
.
targetCPUUtilizationPercent
,
scaleTest
.
minPods
,
scaleTest
.
maxPods
)
defer
common
.
DeleteHorizontalPodAutoscaler
(
rc
,
hpa
.
Name
)
...
...
@@ -137,14 +137,14 @@ func scaleUp(name string, kind schema.GroupVersionKind, checkStability bool, rc
}
scaleTest
:=
&
HPAScaleTest
{
initPods
:
1
,
totalInitialCPUUsage
:
25
0
,
perPodCPURequest
:
5
00
,
totalInitialCPUUsage
:
50
0
,
perPodCPURequest
:
10
00
,
targetCPUUtilizationPercent
:
20
,
minPods
:
1
,
maxPods
:
5
,
firstScale
:
3
,
firstScaleStasis
:
stasis
,
cpuBurst
:
7
00
,
cpuBurst
:
14
00
,
secondScale
:
5
,
}
scaleTest
.
run
(
name
,
kind
,
rc
,
f
)
...
...
@@ -157,8 +157,8 @@ func scaleDown(name string, kind schema.GroupVersionKind, checkStability bool, r
}
scaleTest
:=
&
HPAScaleTest
{
initPods
:
5
,
totalInitialCPUUsage
:
375
,
perPodCPURequest
:
5
00
,
totalInitialCPUUsage
:
650
,
perPodCPURequest
:
10
00
,
targetCPUUtilizationPercent
:
30
,
minPods
:
1
,
maxPods
:
5
,
...
...
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