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
cbce3a1a
Commit
cbce3a1a
authored
Sep 04, 2015
by
Piotr Szczesniak
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #13315 from quinton-hoole/2015-08-27-speed-up-e2e
Create fewer pods in Scheduler Predicates e2e test to speed things up.
parents
de92c9ba
97ddc978
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
scheduler_predicates.go
test/e2e/scheduler_predicates.go
+5
-4
No files found.
test/e2e/scheduler_predicates.go
View file @
cbce3a1a
...
@@ -241,7 +241,7 @@ var _ = Describe("SchedulerPredicates", func() {
...
@@ -241,7 +241,7 @@ var _ = Describe("SchedulerPredicates", func() {
cleanupPods
(
c
,
ns
)
cleanupPods
(
c
,
ns
)
})
})
// This test verifies we don't allow scheduling of pods in a way that sum of limits of pods is greater than machines capacit.
// This test verifies we don't allow scheduling of pods in a way that sum of limits of pods is greater than machines capacit
y
.
// It assumes that cluster add-on pods stay stable and cannot be run in parallel with any other test that touches Nodes or Pods.
// It assumes that cluster add-on pods stay stable and cannot be run in parallel with any other test that touches Nodes or Pods.
// It is so because we need to have precise control on what's running in the cluster.
// It is so because we need to have precise control on what's running in the cluster.
It
(
"validates resource limits of pods that are allowed to run."
,
func
()
{
It
(
"validates resource limits of pods that are allowed to run."
,
func
()
{
...
@@ -267,9 +267,10 @@ var _ = Describe("SchedulerPredicates", func() {
...
@@ -267,9 +267,10 @@ var _ = Describe("SchedulerPredicates", func() {
}
}
var
podsNeededForSaturation
int
var
podsNeededForSaturation
int
milliCpuPerPod
:=
int64
(
500
)
for
name
,
leftCapacity
:=
range
nodeToCapacityMap
{
for
name
,
leftCapacity
:=
range
nodeToCapacityMap
{
Logf
(
"Node: %v has capacity: %v"
,
name
,
leftCapacity
)
Logf
(
"Node: %v has capacity: %v"
,
name
,
leftCapacity
)
podsNeededForSaturation
+=
(
int
)(
leftCapacity
/
100
)
podsNeededForSaturation
+=
(
int
)(
leftCapacity
/
milliCpuPerPod
)
}
}
By
(
fmt
.
Sprintf
(
"Starting additional %v Pods to fully saturate the cluster CPU and trying to start another one"
,
podsNeededForSaturation
))
By
(
fmt
.
Sprintf
(
"Starting additional %v Pods to fully saturate the cluster CPU and trying to start another one"
,
podsNeededForSaturation
))
...
@@ -289,7 +290,7 @@ var _ = Describe("SchedulerPredicates", func() {
...
@@ -289,7 +290,7 @@ var _ = Describe("SchedulerPredicates", func() {
Image
:
"gcr.io/google_containers/pause:go"
,
Image
:
"gcr.io/google_containers/pause:go"
,
Resources
:
api
.
ResourceRequirements
{
Resources
:
api
.
ResourceRequirements
{
Limits
:
api
.
ResourceList
{
Limits
:
api
.
ResourceList
{
"cpu"
:
*
resource
.
NewMilliQuantity
(
100
,
"DecimalSI"
),
"cpu"
:
*
resource
.
NewMilliQuantity
(
milliCpuPerPod
,
"DecimalSI"
),
},
},
},
},
},
},
...
@@ -313,7 +314,7 @@ var _ = Describe("SchedulerPredicates", func() {
...
@@ -313,7 +314,7 @@ var _ = Describe("SchedulerPredicates", func() {
Image
:
"gcr.io/google_containers/pause:go"
,
Image
:
"gcr.io/google_containers/pause:go"
,
Resources
:
api
.
ResourceRequirements
{
Resources
:
api
.
ResourceRequirements
{
Limits
:
api
.
ResourceList
{
Limits
:
api
.
ResourceList
{
"cpu"
:
*
resource
.
NewMilliQuantity
(
100
,
"DecimalSI"
),
"cpu"
:
*
resource
.
NewMilliQuantity
(
milliCpuPerPod
,
"DecimalSI"
),
},
},
},
},
},
},
...
...
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