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
aab1cdfc
Commit
aab1cdfc
authored
Sep 25, 2015
by
Marcin Wielgus
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #14546 from piosz/resource-consumer-fix
Another attempt to fix problem with not ready endpoints in autoscalin…
parents
8dff00a9
b2cc7d0a
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
autoscaling.go
test/e2e/autoscaling.go
+2
-2
autoscaling_utils.go
test/e2e/autoscaling_utils.go
+3
-1
No files found.
test/e2e/autoscaling.go
View file @
aab1cdfc
...
@@ -57,7 +57,7 @@ var _ = Describe("Autoscaling", func() {
...
@@ -57,7 +57,7 @@ var _ = Describe("Autoscaling", func() {
// Consume 60% CPU
// Consume 60% CPU
millicoresPerReplica
:=
600
millicoresPerReplica
:=
600
rc
:=
NewStaticResourceConsumer
(
"
rc
"
,
nodeCount
*
coresPerNode
,
millicoresPerReplica
*
nodeCount
*
coresPerNode
,
0
,
int64
(
millicoresPerReplica
),
100
,
f
)
rc
:=
NewStaticResourceConsumer
(
"
cpu-utilization
"
,
nodeCount
*
coresPerNode
,
millicoresPerReplica
*
nodeCount
*
coresPerNode
,
0
,
int64
(
millicoresPerReplica
),
100
,
f
)
expectNoError
(
waitForClusterSize
(
f
.
Client
,
nodeCount
+
1
,
20
*
time
.
Minute
))
expectNoError
(
waitForClusterSize
(
f
.
Client
,
nodeCount
+
1
,
20
*
time
.
Minute
))
rc
.
CleanUp
()
rc
.
CleanUp
()
...
@@ -79,7 +79,7 @@ var _ = Describe("Autoscaling", func() {
...
@@ -79,7 +79,7 @@ var _ = Describe("Autoscaling", func() {
// Consume 60% of total memory capacity
// Consume 60% of total memory capacity
megabytesPerReplica
:=
int
(
memCapacityMb
*
6
/
10
/
coresPerNode
)
megabytesPerReplica
:=
int
(
memCapacityMb
*
6
/
10
/
coresPerNode
)
rc
:=
NewStaticResourceConsumer
(
"
rc
"
,
nodeCount
*
coresPerNode
,
0
,
megabytesPerReplica
*
nodeCount
*
coresPerNode
,
100
,
int64
(
megabytesPerReplica
+
100
),
f
)
rc
:=
NewStaticResourceConsumer
(
"
mem-utilization
"
,
nodeCount
*
coresPerNode
,
0
,
megabytesPerReplica
*
nodeCount
*
coresPerNode
,
100
,
int64
(
megabytesPerReplica
+
100
),
f
)
expectNoError
(
waitForClusterSize
(
f
.
Client
,
nodeCount
+
1
,
20
*
time
.
Minute
))
expectNoError
(
waitForClusterSize
(
f
.
Client
,
nodeCount
+
1
,
20
*
time
.
Minute
))
rc
.
CleanUp
()
rc
.
CleanUp
()
...
...
test/e2e/autoscaling_utils.go
View file @
aab1cdfc
...
@@ -250,7 +250,6 @@ func runServiceAndRCForResourceConsumer(c *client.Client, ns, name string, repli
...
@@ -250,7 +250,6 @@ func runServiceAndRCForResourceConsumer(c *client.Client, ns, name string, repli
},
},
})
})
expectNoError
(
err
)
expectNoError
(
err
)
expectNoError
(
waitForService
(
c
,
ns
,
name
,
true
,
startServiceInterval
,
startServiceTimeout
))
config
:=
RCConfig
{
config
:=
RCConfig
{
Client
:
c
,
Client
:
c
,
Image
:
image
,
Image
:
image
,
...
@@ -262,4 +261,7 @@ func runServiceAndRCForResourceConsumer(c *client.Client, ns, name string, repli
...
@@ -262,4 +261,7 @@ func runServiceAndRCForResourceConsumer(c *client.Client, ns, name string, repli
MemLimit
:
memLimitMb
*
1024
*
1024
,
// MemLimit is in bytes
MemLimit
:
memLimitMb
*
1024
*
1024
,
// MemLimit is in bytes
}
}
expectNoError
(
RunRC
(
config
))
expectNoError
(
RunRC
(
config
))
// Make sure endpoints are propagated.
// TODO(piosz): replace sleep with endpoints watch.
time
.
Sleep
(
10
*
time
.
Second
)
}
}
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