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
7a5e9582
Commit
7a5e9582
authored
Nov 03, 2017
by
Krzysztof Jastrzebski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add scale down to 1 e2e test.
parent
aa66d8cb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
9 deletions
+22
-9
cluster_size_autoscaling.go
test/e2e/autoscaling/cluster_size_autoscaling.go
+22
-9
No files found.
test/e2e/autoscaling/cluster_size_autoscaling.go
View file @
7a5e9582
...
@@ -757,25 +757,38 @@ var _ = SIGDescribe("Cluster size autoscaling [Slow]", func() {
...
@@ -757,25 +757,38 @@ var _ = SIGDescribe("Cluster size autoscaling [Slow]", func() {
framework
.
ExpectNoError
(
framework
.
WaitForReadyNodes
(
c
,
len
(
nodes
.
Items
),
nodesRecoverTimeout
))
framework
.
ExpectNoError
(
framework
.
WaitForReadyNodes
(
c
,
len
(
nodes
.
Items
),
nodesRecoverTimeout
))
})
})
It
(
"should add new node and new node pool on too big pod [Feature:ClusterSizeAutoscalingScaleWithNAP]"
,
func
()
{
It
(
"should add new node and new node pool on too big pod
, scale down to 1 and scale down to 0
[Feature:ClusterSizeAutoscalingScaleWithNAP]"
,
func
()
{
framework
.
SkipUnlessProviderIs
(
"gke"
)
framework
.
SkipUnlessProviderIs
(
"gke"
)
Expect
(
getNAPNodePoolsNumber
())
.
Should
(
Equal
(
0
))
Expect
(
getNAPNodePoolsNumber
())
.
Should
(
Equal
(
0
))
framework
.
ExpectNoError
(
enableAutoprovisioning
())
framework
.
ExpectNoError
(
enableAutoprovisioning
())
By
(
"Create
pod that is too big
"
)
By
(
"Create
first pod
"
)
ReserveMemory
(
f
,
"memory-reservation"
,
1
,
int
(
1.1
*
float64
(
memAllocatableMb
)),
true
,
defaultTimeout
)
ReserveMemory
(
f
,
"memory-reservation
1
"
,
1
,
int
(
1.1
*
float64
(
memAllocatableMb
)),
true
,
defaultTimeout
)
defer
framework
.
DeleteRCAndPods
(
f
.
ClientSet
,
f
.
InternalClientset
,
f
.
Namespace
.
Name
,
"memory-reservation"
)
defer
framework
.
DeleteRCAndPods
(
f
.
ClientSet
,
f
.
InternalClientset
,
f
.
Namespace
.
Name
,
"memory-reservation
1
"
)
By
(
"Waiting for scale up"
)
By
(
"Waiting for scale up"
)
// Verify that cluster size increased.
// Verify that cluster size increased.
framework
.
ExpectNoError
(
WaitForClusterSizeFunc
(
f
.
ClientSet
,
framework
.
ExpectNoError
(
WaitForClusterSizeFunc
(
f
.
ClientSet
,
func
(
size
int
)
bool
{
return
size
>
nodeCount
},
time
.
Second
))
func
(
size
int
)
bool
{
return
size
==
nodeCount
+
1
},
defaultTimeout
))
By
(
"Check if NAP group was created"
)
By
(
"Check if NAP group was created"
)
Expect
(
getNAPNodePoolsNumber
())
.
Should
(
Equal
(
1
))
Expect
(
getNAPNodePoolsNumber
())
.
Should
(
Equal
(
1
))
By
(
"Delete pod"
)
By
(
"Create second pod"
)
framework
.
DeleteRCAndPods
(
f
.
ClientSet
,
f
.
InternalClientset
,
f
.
Namespace
.
Name
,
"memory-reservation"
)
ReserveMemory
(
f
,
"memory-reservation2"
,
1
,
int
(
1.1
*
float64
(
memAllocatableMb
)),
true
,
defaultTimeout
)
By
(
"Waiting for scale down"
)
defer
framework
.
DeleteRCAndPods
(
f
.
ClientSet
,
f
.
InternalClientset
,
f
.
Namespace
.
Name
,
"memory-reservation2"
)
By
(
"Waiting for scale up"
)
// Verify that cluster size increased.
framework
.
ExpectNoError
(
WaitForClusterSizeFunc
(
f
.
ClientSet
,
func
(
size
int
)
bool
{
return
size
==
nodeCount
+
2
},
defaultTimeout
))
By
(
"Delete first pod"
)
framework
.
DeleteRCAndPods
(
f
.
ClientSet
,
f
.
InternalClientset
,
f
.
Namespace
.
Name
,
"memory-reservation1"
)
By
(
"Waiting for scale down to 1"
)
// Verify that cluster size decreased.
framework
.
ExpectNoError
(
WaitForClusterSizeFunc
(
f
.
ClientSet
,
func
(
size
int
)
bool
{
return
size
==
nodeCount
+
1
},
scaleDownTimeout
))
By
(
"Delete second pod"
)
framework
.
DeleteRCAndPods
(
f
.
ClientSet
,
f
.
InternalClientset
,
f
.
Namespace
.
Name
,
"memory-reservation2"
)
By
(
"Waiting for scale down to 0"
)
// Verify that cluster size decreased.
// Verify that cluster size decreased.
framework
.
ExpectNoError
(
WaitForClusterSizeFunc
(
f
.
ClientSet
,
framework
.
ExpectNoError
(
WaitForClusterSizeFunc
(
f
.
ClientSet
,
func
(
size
int
)
bool
{
return
size
<
=
nodeCount
},
scaleDownTimeout
))
func
(
size
int
)
bool
{
return
size
=
=
nodeCount
},
scaleDownTimeout
))
By
(
"Waiting for NAP group remove"
)
By
(
"Waiting for NAP group remove"
)
framework
.
ExpectNoError
(
waitTillAllNAPNodePoolsAreRemoved
())
framework
.
ExpectNoError
(
waitTillAllNAPNodePoolsAreRemoved
())
By
(
"Check if NAP group was removeed"
)
By
(
"Check if NAP group was removeed"
)
...
...
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