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
daf77aca
Commit
daf77aca
authored
Sep 20, 2017
by
Aleksandra Malinowska
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adjust parameter in cluster autoscaling test
parent
02f48b68
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
autoscaling_timer.go
test/e2e/autoscaling/autoscaling_timer.go
+2
-2
cluster_size_autoscaling.go
test/e2e/autoscaling/cluster_size_autoscaling.go
+1
-1
No files found.
test/e2e/autoscaling/autoscaling_timer.go
View file @
daf77aca
...
...
@@ -79,7 +79,7 @@ var _ = SIGDescribe("[Feature:ClusterSizeAutoscalingScaleUp] [Slow] Autoscaling"
// Calculate the CPU request of the service.
// This test expects that 8 pods will not fit in 'nodesNum' nodes, but will fit in >='nodesNum'+1 nodes.
// Make it so that 'nodesNum' pods fit perfectly per node
(in practice other things take space, so less than that will fit)
.
// Make it so that 'nodesNum' pods fit perfectly per node.
nodeCpus
:=
nodes
.
Items
[
0
]
.
Status
.
Allocatable
[
v1
.
ResourceCPU
]
nodeCpuMillis
:=
(
&
nodeCpus
)
.
MilliValue
()
cpuRequestMillis
:=
int64
(
nodeCpuMillis
/
nodesNum
)
...
...
@@ -87,7 +87,7 @@ var _ = SIGDescribe("[Feature:ClusterSizeAutoscalingScaleUp] [Slow] Autoscaling"
// Start the service we want to scale and wait for it to be up and running.
nodeMemoryBytes
:=
nodes
.
Items
[
0
]
.
Status
.
Allocatable
[
v1
.
ResourceMemory
]
nodeMemoryMB
:=
(
&
nodeMemoryBytes
)
.
Value
()
/
1024
/
1024
memRequestMB
:=
nodeMemoryMB
/
10
// Ensure each pod takes not more than 10% of node's
total
memory.
memRequestMB
:=
nodeMemoryMB
/
10
// Ensure each pod takes not more than 10% of node's
allocatable
memory.
replicas
:=
1
resourceConsumer
:=
common
.
NewDynamicResourceConsumer
(
"resource-consumer"
,
common
.
KindDeployment
,
replicas
,
0
,
0
,
0
,
cpuRequestMillis
,
memRequestMB
,
f
)
defer
resourceConsumer
.
CleanUp
()
...
...
test/e2e/autoscaling/cluster_size_autoscaling.go
View file @
daf77aca
...
...
@@ -477,7 +477,7 @@ var _ = SIGDescribe("Cluster size autoscaling [Slow]", func() {
framework
.
ExpectNoError
(
enableAutoscaler
(
extraPoolName
,
1
,
2
))
By
(
"Creating rc with 2 pods too big to fit default-pool but fitting extra-pool"
)
ReserveMemory
(
f
,
"memory-reservation"
,
2
,
int
(
2.
1
*
float64
(
memAllocatableMb
)),
false
,
defaultTimeout
)
ReserveMemory
(
f
,
"memory-reservation"
,
2
,
int
(
2.
5
*
float64
(
memAllocatableMb
)),
false
,
defaultTimeout
)
defer
framework
.
DeleteRCAndPods
(
f
.
ClientSet
,
f
.
InternalClientset
,
f
.
Namespace
.
Name
,
"memory-reservation"
)
// Apparently GKE master is restarted couple minutes after the node pool is added
...
...
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