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
977b1d95
Commit
977b1d95
authored
Jul 09, 2015
by
Wojciech Tyczynski
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #10823 from piosz/real_test
Added load test with pods doing real works
parents
9d328300
3fb39542
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
15 deletions
+24
-15
e2e.sh
hack/jenkins/e2e.sh
+1
-1
load.go
test/e2e/load.go
+18
-11
util.go
test/e2e/util.go
+5
-3
No files found.
hack/jenkins/e2e.sh
View file @
977b1d95
...
@@ -164,7 +164,7 @@ case ${JOB_NAME} in
...
@@ -164,7 +164,7 @@ case ${JOB_NAME} in
kubernetes-e2e-gce-scalability
)
kubernetes-e2e-gce-scalability
)
:
${
E2E_CLUSTER_NAME
:
=
"jenkins-gce-e2e-scalability"
}
:
${
E2E_CLUSTER_NAME
:
=
"jenkins-gce-e2e-scalability"
}
:
${
E2E_NETWORK
:
=
"e2e-scalability"
}
:
${
E2E_NETWORK
:
=
"e2e-scalability"
}
:
${
GINKGO_TEST_ARGS
:
=
"--ginkgo.focus=Performance
\s
suite
|should
\s
be
\s
able
\s
to
\s
handle
"
}
:
${
GINKGO_TEST_ARGS
:
=
"--ginkgo.focus=Performance
\s
suite"
}
:
${
KUBE_GCE_INSTANCE_PREFIX
:
=
"e2e-scalability"
}
:
${
KUBE_GCE_INSTANCE_PREFIX
:
=
"e2e-scalability"
}
:
${
PROJECT
:
=
"kubernetes-jenkins"
}
:
${
PROJECT
:
=
"kubernetes-jenkins"
}
# Override GCE defaults.
# Override GCE defaults.
...
...
test/e2e/load.go
View file @
977b1d95
...
@@ -33,7 +33,6 @@ import (
...
@@ -33,7 +33,6 @@ import (
)
)
const
(
const
(
image
=
"gcr.io/google_containers/serve_hostname:1.1"
smallRCSize
=
5
smallRCSize
=
5
mediumRCSize
=
30
mediumRCSize
=
30
bigRCSize
=
250
bigRCSize
=
250
...
@@ -94,17 +93,22 @@ var _ = Describe("Load capacity", func() {
...
@@ -94,17 +93,22 @@ var _ = Describe("Load capacity", func() {
type
Load
struct
{
type
Load
struct
{
podsPerNode
int
podsPerNode
int
image
string
command
[]
string
}
}
loadTests
:=
[]
Load
{
loadTests
:=
[]
Load
{
{
podsPerNode
:
30
},
// The container will consume 1 cpu and 512mb of memory.
{
podsPerNode
:
3
,
image
:
"jess/stress"
,
command
:
[]
string
{
"stress"
,
"-c"
,
"1"
,
"-m"
,
"2"
}},
{
podsPerNode
:
30
,
image
:
"gcr.io/google_containers/serve_hostname:1.1"
},
}
}
for
_
,
testArg
:=
range
loadTests
{
for
_
,
testArg
:=
range
loadTests
{
name
:=
fmt
.
Sprintf
(
"[Skipped] should be able to handle %v pods per node"
,
testArg
.
podsPerNode
)
name
:=
fmt
.
Sprintf
(
"[Skipped] [Performance suite] should be able to handle %v pods per node"
,
testArg
.
podsPerNode
)
itArg
:=
testArg
It
(
name
,
func
()
{
It
(
name
,
func
()
{
configs
=
generateRCConfigs
(
testArg
.
podsPerNode
*
nodeCount
,
c
,
ns
)
configs
=
generateRCConfigs
(
itArg
.
podsPerNode
*
nodeCount
,
itArg
.
image
,
itArg
.
command
,
c
,
ns
)
// Simulate lifetime of RC:
// Simulate lifetime of RC:
// * create with initial size
// * create with initial size
...
@@ -134,23 +138,25 @@ func computeRCCounts(total int) (int, int, int) {
...
@@ -134,23 +138,25 @@ func computeRCCounts(total int) (int, int, int) {
// - 25 medium RCs each 30 pods
// - 25 medium RCs each 30 pods
// - 3 big RCs each 250 pods
// - 3 big RCs each 250 pods
bigRCCount
:=
total
/
4
/
bigRCSize
bigRCCount
:=
total
/
4
/
bigRCSize
mediumRCCount
:=
total
/
4
/
mediumRCSize
total
-=
bigRCCount
*
bigRCSize
smallRCCount
:=
total
/
2
/
smallRCSize
mediumRCCount
:=
total
/
3
/
mediumRCSize
total
-=
mediumRCCount
*
mediumRCSize
smallRCCount
:=
total
/
smallRCSize
return
smallRCCount
,
mediumRCCount
,
bigRCCount
return
smallRCCount
,
mediumRCCount
,
bigRCCount
}
}
func
generateRCConfigs
(
totalPods
int
,
c
*
client
.
Client
,
ns
string
)
[]
*
RCConfig
{
func
generateRCConfigs
(
totalPods
int
,
image
string
,
command
[]
string
,
c
*
client
.
Client
,
ns
string
)
[]
*
RCConfig
{
configs
:=
make
([]
*
RCConfig
,
0
)
configs
:=
make
([]
*
RCConfig
,
0
)
smallRCCount
,
mediumRCCount
,
bigRCCount
:=
computeRCCounts
(
totalPods
)
smallRCCount
,
mediumRCCount
,
bigRCCount
:=
computeRCCounts
(
totalPods
)
configs
=
append
(
configs
,
generateRCConfigsForGroup
(
c
,
ns
,
smallRCGroupName
,
smallRCSize
,
smallRCCount
)
...
)
configs
=
append
(
configs
,
generateRCConfigsForGroup
(
c
,
ns
,
smallRCGroupName
,
smallRCSize
,
smallRCCount
,
image
,
command
)
...
)
configs
=
append
(
configs
,
generateRCConfigsForGroup
(
c
,
ns
,
mediumRCGroupName
,
mediumRCSize
,
mediumRCCount
)
...
)
configs
=
append
(
configs
,
generateRCConfigsForGroup
(
c
,
ns
,
mediumRCGroupName
,
mediumRCSize
,
mediumRCCount
,
image
,
command
)
...
)
configs
=
append
(
configs
,
generateRCConfigsForGroup
(
c
,
ns
,
bigRCGroupName
,
bigRCSize
,
bigRCCount
)
...
)
configs
=
append
(
configs
,
generateRCConfigsForGroup
(
c
,
ns
,
bigRCGroupName
,
bigRCSize
,
bigRCCount
,
image
,
command
)
...
)
return
configs
return
configs
}
}
func
generateRCConfigsForGroup
(
c
*
client
.
Client
,
ns
,
groupName
string
,
size
,
count
int
)
[]
*
RCConfig
{
func
generateRCConfigsForGroup
(
c
*
client
.
Client
,
ns
,
groupName
string
,
size
,
count
int
,
image
string
,
command
[]
string
)
[]
*
RCConfig
{
configs
:=
make
([]
*
RCConfig
,
0
,
count
)
configs
:=
make
([]
*
RCConfig
,
0
,
count
)
for
i
:=
1
;
i
<=
count
;
i
++
{
for
i
:=
1
;
i
<=
count
;
i
++
{
config
:=
&
RCConfig
{
config
:=
&
RCConfig
{
...
@@ -159,6 +165,7 @@ func generateRCConfigsForGroup(c *client.Client, ns, groupName string, size, cou
...
@@ -159,6 +165,7 @@ func generateRCConfigsForGroup(c *client.Client, ns, groupName string, size, cou
Namespace
:
ns
,
Namespace
:
ns
,
Timeout
:
10
*
time
.
Minute
,
Timeout
:
10
*
time
.
Minute
,
Image
:
image
,
Image
:
image
,
Command
:
command
,
Replicas
:
size
,
Replicas
:
size
,
}
}
configs
=
append
(
configs
,
config
)
configs
=
append
(
configs
,
config
)
...
...
test/e2e/util.go
View file @
977b1d95
...
@@ -159,6 +159,7 @@ func (s *podStore) Stop() {
...
@@ -159,6 +159,7 @@ func (s *podStore) Stop() {
type
RCConfig
struct
{
type
RCConfig
struct
{
Client
*
client
.
Client
Client
*
client
.
Client
Image
string
Image
string
Command
[]
string
Name
string
Name
string
Namespace
string
Namespace
string
PollInterval
time
.
Duration
PollInterval
time
.
Duration
...
@@ -1020,9 +1021,10 @@ func RunRC(config RCConfig) error {
...
@@ -1020,9 +1021,10 @@ func RunRC(config RCConfig) error {
Spec
:
api
.
PodSpec
{
Spec
:
api
.
PodSpec
{
Containers
:
[]
api
.
Container
{
Containers
:
[]
api
.
Container
{
{
{
Name
:
config
.
Name
,
Name
:
config
.
Name
,
Image
:
config
.
Image
,
Image
:
config
.
Image
,
Ports
:
[]
api
.
ContainerPort
{{
ContainerPort
:
80
}},
Command
:
config
.
Command
,
Ports
:
[]
api
.
ContainerPort
{{
ContainerPort
:
80
}},
},
},
},
},
},
},
...
...
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