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
fe161ffa
Commit
fe161ffa
authored
Sep 26, 2017
by
Aleksandra Malinowska
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cluster size autoscaling tests fixes
parent
b188868f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
cluster_size_autoscaling.go
test/e2e/autoscaling/cluster_size_autoscaling.go
+8
-4
No files found.
test/e2e/autoscaling/cluster_size_autoscaling.go
View file @
fe161ffa
...
@@ -623,11 +623,12 @@ var _ = SIGDescribe("Cluster size autoscaling [Slow]", func() {
...
@@ -623,11 +623,12 @@ var _ = SIGDescribe("Cluster size autoscaling [Slow]", func() {
// Determine whether we want to run & adjust the setup if necessary
// Determine whether we want to run & adjust the setup if necessary
if
len
(
originalSizes
)
<
2
{
if
len
(
originalSizes
)
<
2
{
if
framework
.
ProviderIs
(
"gke"
)
{
if
framework
.
ProviderIs
(
"gke"
)
{
By
(
"Adding a new node pool"
)
const
extraPoolName
=
"extra-pool"
const
extraPoolName
=
"extra-pool"
addNodePool
(
extraPoolName
,
"n1-standard-4"
,
1
)
addNodePool
(
extraPoolName
,
"n1-standard-4"
,
1
)
defer
deleteNodePool
(
extraPoolName
)
defer
deleteNodePool
(
extraPoolName
)
err
:=
enableAutoscaler
(
extraPoolName
,
0
,
1
)
framework
.
ExpectNoError
(
framework
.
WaitForReadyNodes
(
c
,
nodeCount
+
1
,
resizeTimeout
)
)
framework
.
ExpectNoError
(
e
rr
)
framework
.
ExpectNoError
(
e
nableAutoscaler
(
extraPoolName
,
0
,
1
)
)
}
else
{
}
else
{
framework
.
Skipf
(
"At least 2 node groups are needed for scale-to-0 tests"
)
framework
.
Skipf
(
"At least 2 node groups are needed for scale-to-0 tests"
)
}
}
...
@@ -831,12 +832,15 @@ func enableAutoscaler(nodePool string, minCount, maxCount int) error {
...
@@ -831,12 +832,15 @@ func enableAutoscaler(nodePool string, minCount, maxCount int) error {
glog
.
Infof
(
"Config update result: %s"
,
putResult
)
glog
.
Infof
(
"Config update result: %s"
,
putResult
)
}
}
var
finalErr
error
for
startTime
:=
time
.
Now
();
startTime
.
Add
(
gkeUpdateTimeout
)
.
After
(
time
.
Now
());
time
.
Sleep
(
30
*
time
.
Second
)
{
for
startTime
:=
time
.
Now
();
startTime
.
Add
(
gkeUpdateTimeout
)
.
After
(
time
.
Now
());
time
.
Sleep
(
30
*
time
.
Second
)
{
if
val
,
err
:=
isAutoscalerEnabled
(
minCount
);
err
==
nil
&&
val
{
val
,
err
:=
isAutoscalerEnabled
(
minCount
)
if
err
==
nil
&&
val
{
return
nil
return
nil
}
}
finalErr
=
err
}
}
return
fmt
.
Errorf
(
"autoscaler not enabled
"
)
return
fmt
.
Errorf
(
"autoscaler not enabled
, last error: %v"
,
finalErr
)
}
}
func
disableAutoscaler
(
nodePool
string
,
minCount
,
maxCount
int
)
error
{
func
disableAutoscaler
(
nodePool
string
,
minCount
,
maxCount
int
)
error
{
...
...
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