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
eabe65cb
Commit
eabe65cb
authored
Jun 13, 2016
by
Jerzy Szczepkowski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reduced flakiness of HPA e2e tests.
Reduced flakiness of HPA e2e tests.
parent
875a60d0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
18 deletions
+25
-18
cluster_size_autoscaling.go
test/e2e/cluster_size_autoscaling.go
+1
-1
horizontal_pod_autoscaling.go
test/e2e/horizontal_pod_autoscaling.go
+24
-17
No files found.
test/e2e/cluster_size_autoscaling.go
View file @
eabe65cb
/*
/*
Copyright 201
5
The Kubernetes Authors All rights reserved.
Copyright 201
6
The Kubernetes Authors All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
you may not use this file except in compliance with the License.
...
...
test/e2e/horizontal_pod_autoscaling.go
View file @
eabe65cb
...
@@ -39,38 +39,37 @@ var _ = framework.KubeDescribe("[HPA] Horizontal pod autoscaling (scale resource
...
@@ -39,38 +39,37 @@ var _ = framework.KubeDescribe("[HPA] Horizontal pod autoscaling (scale resource
var
rc
*
ResourceConsumer
var
rc
*
ResourceConsumer
f
:=
framework
.
NewDefaultFramework
(
"horizontal-pod-autoscaling"
)
f
:=
framework
.
NewDefaultFramework
(
"horizontal-pod-autoscaling"
)
titleUp
:=
"Should scale from 1 pod to 3 pods and from 3 to 5
and verify decision stability
"
titleUp
:=
"Should scale from 1 pod to 3 pods and from 3 to 5"
titleDown
:=
"Should scale from 5 pods to 3 pods and from 3 to 1
and verify decision stability
"
titleDown
:=
"Should scale from 5 pods to 3 pods and from 3 to 1"
// These tests take ~20 minutes each.
framework
.
KubeDescribe
(
"[Serial] [Slow] Deployment"
,
func
()
{
framework
.
KubeDescribe
(
"[Serial] [Slow] Deployment"
,
func
()
{
// CPU tests via deployments
// CPU tests via deployments
It
(
titleUp
,
func
()
{
It
(
titleUp
,
func
()
{
scaleUp
(
"test-deployment"
,
kindDeployment
,
rc
,
f
)
scaleUp
(
"test-deployment"
,
kindDeployment
,
false
,
rc
,
f
)
})
})
It
(
titleDown
,
func
()
{
It
(
titleDown
,
func
()
{
scaleDown
(
"test-deployment"
,
kindDeployment
,
rc
,
f
)
scaleDown
(
"test-deployment"
,
kindDeployment
,
false
,
rc
,
f
)
})
})
})
})
// These tests take ~20 minutes each.
framework
.
KubeDescribe
(
"[Serial] [Slow] ReplicaSet"
,
func
()
{
framework
.
KubeDescribe
(
"[Serial] [Slow] ReplicaSet"
,
func
()
{
// CPU tests via deployments
// CPU tests via deployments
It
(
titleUp
,
func
()
{
It
(
titleUp
,
func
()
{
scaleUp
(
"rs"
,
kindReplicaSet
,
rc
,
f
)
scaleUp
(
"rs"
,
kindReplicaSet
,
false
,
rc
,
f
)
})
})
It
(
titleDown
,
func
()
{
It
(
titleDown
,
func
()
{
scaleDown
(
"rs"
,
kindReplicaSet
,
rc
,
f
)
scaleDown
(
"rs"
,
kindReplicaSet
,
false
,
rc
,
f
)
})
})
})
})
// These tests take ~20 minutes each.
// These tests take ~20 minutes each.
framework
.
KubeDescribe
(
"[Serial] [Slow] ReplicationController"
,
func
()
{
framework
.
KubeDescribe
(
"[Serial] [Slow] ReplicationController"
,
func
()
{
// CPU tests via replication controllers
// CPU tests via replication controllers
It
(
titleUp
,
func
()
{
It
(
titleUp
+
" and verify decision stability"
,
func
()
{
scaleUp
(
"rc"
,
kindRC
,
rc
,
f
)
scaleUp
(
"rc"
,
kindRC
,
true
,
rc
,
f
)
})
})
It
(
titleDown
,
func
()
{
It
(
titleDown
+
" and verify decision stability"
,
func
()
{
scaleDown
(
"rc"
,
kindRC
,
rc
,
f
)
scaleDown
(
"rc"
,
kindRC
,
true
,
rc
,
f
)
})
})
})
})
...
@@ -136,7 +135,11 @@ func (scaleTest *HPAScaleTest) run(name, kind string, rc *ResourceConsumer, f *f
...
@@ -136,7 +135,11 @@ func (scaleTest *HPAScaleTest) run(name, kind string, rc *ResourceConsumer, f *f
}
}
}
}
func
scaleUp
(
name
,
kind
string
,
rc
*
ResourceConsumer
,
f
*
framework
.
Framework
)
{
func
scaleUp
(
name
,
kind
string
,
checkStability
bool
,
rc
*
ResourceConsumer
,
f
*
framework
.
Framework
)
{
stasis
:=
0
*
time
.
Minute
if
checkStability
{
stasis
=
10
*
time
.
Minute
}
scaleTest
:=
&
HPAScaleTest
{
scaleTest
:=
&
HPAScaleTest
{
initPods
:
1
,
initPods
:
1
,
totalInitialCPUUsage
:
250
,
totalInitialCPUUsage
:
250
,
...
@@ -145,23 +148,27 @@ func scaleUp(name, kind string, rc *ResourceConsumer, f *framework.Framework) {
...
@@ -145,23 +148,27 @@ func scaleUp(name, kind string, rc *ResourceConsumer, f *framework.Framework) {
minPods
:
1
,
minPods
:
1
,
maxPods
:
5
,
maxPods
:
5
,
firstScale
:
3
,
firstScale
:
3
,
firstScaleStasis
:
10
*
time
.
Minute
,
firstScaleStasis
:
stasis
,
cpuBurst
:
700
,
cpuBurst
:
700
,
secondScale
:
5
,
secondScale
:
5
,
}
}
scaleTest
.
run
(
name
,
kind
,
rc
,
f
)
scaleTest
.
run
(
name
,
kind
,
rc
,
f
)
}
}
func
scaleDown
(
name
,
kind
string
,
rc
*
ResourceConsumer
,
f
*
framework
.
Framework
)
{
func
scaleDown
(
name
,
kind
string
,
checkStability
bool
,
rc
*
ResourceConsumer
,
f
*
framework
.
Framework
)
{
stasis
:=
0
*
time
.
Minute
if
checkStability
{
stasis
=
10
*
time
.
Minute
}
scaleTest
:=
&
HPAScaleTest
{
scaleTest
:=
&
HPAScaleTest
{
initPods
:
5
,
initPods
:
5
,
totalInitialCPUUsage
:
400
,
totalInitialCPUUsage
:
375
,
perPodCPURequest
:
500
,
perPodCPURequest
:
500
,
targetCPUUtilizationPercent
:
30
,
targetCPUUtilizationPercent
:
30
,
minPods
:
1
,
minPods
:
1
,
maxPods
:
5
,
maxPods
:
5
,
firstScale
:
3
,
firstScale
:
3
,
firstScaleStasis
:
10
*
time
.
Minute
,
firstScaleStasis
:
stasis
,
cpuBurst
:
100
,
cpuBurst
:
100
,
secondScale
:
1
,
secondScale
:
1
,
}
}
...
...
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