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
c0c77d76
Commit
c0c77d76
authored
Apr 10, 2017
by
Maciej Pytel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a retry to cluster-autoscaler e2e
parent
aeac661b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
3 deletions
+17
-3
cluster_size_autoscaling.go
test/e2e/autoscaling/cluster_size_autoscaling.go
+17
-3
No files found.
test/e2e/autoscaling/cluster_size_autoscaling.go
View file @
c0c77d76
...
...
@@ -735,7 +735,8 @@ func waitForAllCaPodsReadyInNamespace(f *framework.Framework, c clientset.Interf
return
fmt
.
Errorf
(
"Some pods are still not running: %v"
,
notready
)
}
func
setMigSizes
(
sizes
map
[
string
]
int
)
{
func
setMigSizes
(
sizes
map
[
string
]
int
)
bool
{
madeChanges
:=
false
for
mig
,
desiredSize
:=
range
sizes
{
currentSize
,
err
:=
framework
.
GroupSize
(
mig
)
framework
.
ExpectNoError
(
err
)
...
...
@@ -743,8 +744,10 @@ func setMigSizes(sizes map[string]int) {
By
(
fmt
.
Sprintf
(
"Setting size of %s to %d"
,
mig
,
desiredSize
))
err
=
framework
.
ResizeGroup
(
mig
,
int32
(
desiredSize
))
framework
.
ExpectNoError
(
err
)
madeChanges
=
true
}
}
return
madeChanges
}
func
makeNodeUnschedulable
(
c
clientset
.
Interface
,
node
*
v1
.
Node
)
error
{
...
...
@@ -899,8 +902,19 @@ func manuallyIncreaseClusterSize(f *framework.Framework, originalSizes map[strin
increasedSize
+=
val
+
newNodesForScaledownTests
}
setMigSizes
(
newSizes
)
framework
.
ExpectNoError
(
WaitForClusterSizeFunc
(
f
.
ClientSet
,
func
(
size
int
)
bool
{
return
size
>=
increasedSize
},
scaleUpTimeout
))
checkClusterSize
:=
func
(
size
int
)
bool
{
if
size
>=
increasedSize
{
return
true
}
resized
:=
setMigSizes
(
newSizes
)
if
resized
{
glog
.
Warning
(
"Unexpected node group size while waiting for cluster resize. Setting size to target again."
)
}
return
false
}
framework
.
ExpectNoError
(
WaitForClusterSizeFunc
(
f
.
ClientSet
,
checkClusterSize
,
scaleUpTimeout
))
return
increasedSize
}
...
...
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