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
7076eed0
Commit
7076eed0
authored
Apr 06, 2018
by
wojtekt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix dns autoscaling test for Regional Clusters
parent
56482005
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
7 deletions
+5
-7
dns_autoscaling.go
test/e2e/autoscaling/dns_autoscaling.go
+5
-7
No files found.
test/e2e/autoscaling/dns_autoscaling.go
View file @
7076eed0
...
...
@@ -99,9 +99,11 @@ var _ = SIGDescribe("DNS horizontal autoscaling", func() {
// This test is separated because it is slow and need to run serially.
// Will take around 5 minutes to run on a 4 nodes cluster.
It
(
"[Serial] [Slow] kube-dns-autoscaler should scale kube-dns pods when cluster size changed"
,
func
()
{
numNodes
,
err
:=
framework
.
NumberOfRegisteredNodes
(
c
)
Expect
(
err
)
.
NotTo
(
HaveOccurred
())
By
(
"Replace the dns autoscaling parameters with testing parameters"
)
err
:
=
updateDNSScalingConfigMap
(
c
,
packDNSScalingConfigMap
(
packLinearParams
(
&
DNSParams_1
)))
err
=
updateDNSScalingConfigMap
(
c
,
packDNSScalingConfigMap
(
packLinearParams
(
&
DNSParams_1
)))
Expect
(
err
)
.
NotTo
(
HaveOccurred
())
defer
func
()
{
By
(
"Restoring initial dns autoscaling parameters"
)
...
...
@@ -117,25 +119,21 @@ var _ = SIGDescribe("DNS horizontal autoscaling", func() {
Expect
(
waitForDNSReplicasSatisfied
(
c
,
getExpectReplicasLinear
,
DNSdefaultTimeout
))
.
NotTo
(
HaveOccurred
())
originalSizes
:=
make
(
map
[
string
]
int
)
sum
:=
0
for
_
,
mig
:=
range
strings
.
Split
(
framework
.
TestContext
.
CloudConfig
.
NodeInstanceGroup
,
","
)
{
size
,
err
:=
framework
.
GroupSize
(
mig
)
Expect
(
err
)
.
NotTo
(
HaveOccurred
())
By
(
fmt
.
Sprintf
(
"Initial size of %s: %d"
,
mig
,
size
))
originalSizes
[
mig
]
=
size
sum
+=
size
}
By
(
"Manually increase cluster size"
)
increasedSize
:=
0
increasedSizes
:=
make
(
map
[
string
]
int
)
for
key
,
val
:=
range
originalSizes
{
increasedSizes
[
key
]
=
val
+
1
increasedSize
+=
increasedSizes
[
key
]
}
setMigSizes
(
increasedSizes
)
Expect
(
WaitForClusterSizeFunc
(
c
,
func
(
size
int
)
bool
{
return
size
==
increasedSize
},
scaleUpTimeout
))
.
NotTo
(
HaveOccurred
())
func
(
size
int
)
bool
{
return
size
==
numNodes
+
len
(
originalSizes
)
},
scaleUpTimeout
))
.
NotTo
(
HaveOccurred
())
By
(
"Wait for kube-dns scaled to expected number"
)
getExpectReplicasLinear
=
getExpectReplicasFuncLinear
(
c
,
&
DNSParams_1
)
...
...
@@ -151,7 +149,7 @@ var _ = SIGDescribe("DNS horizontal autoscaling", func() {
By
(
"Restoring cluster size"
)
setMigSizes
(
originalSizes
)
Expect
(
framework
.
WaitForReadyNodes
(
c
,
sum
,
scaleDownTimeout
))
.
NotTo
(
HaveOccurred
())
Expect
(
framework
.
WaitForReadyNodes
(
c
,
numNodes
,
scaleDownTimeout
))
.
NotTo
(
HaveOccurred
())
By
(
"Wait for kube-dns scaled to expected number"
)
Expect
(
waitForDNSReplicasSatisfied
(
c
,
getExpectReplicasLinear
,
DNSdefaultTimeout
))
.
NotTo
(
HaveOccurred
())
...
...
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