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
5b6eee29
Commit
5b6eee29
authored
Jan 30, 2015
by
Filipe Brandenburger
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3993 from satnam6502/services
Fix services.sh to swap out broken kubecfg calls
parents
96408028
b7aa81eb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
services.sh
hack/e2e-suite/services.sh
+8
-8
No files found.
hack/e2e-suite/services.sh
View file @
5b6eee29
...
@@ -87,7 +87,7 @@ function start_service() {
...
@@ -87,7 +87,7 @@ function start_service() {
"containers": [
"containers": [
{
{
"name": "
$1
",
"name": "
$1
",
"image": "kubernetes/serve_hostname",
"image": "kubernetes/serve_hostname
:1.1
",
"ports": [
"ports": [
{
{
"containerPort": 9376,
"containerPort": 9376,
...
@@ -145,12 +145,12 @@ function stop_service() {
...
@@ -145,12 +145,12 @@ function stop_service() {
# $2: expected pod count
# $2: expected pod count
function
query_pods
()
{
function
query_pods
()
{
# This fails very occasionally, so retry a bit.
# This fails very occasionally, so retry a bit.
pods_unsorted
=()
local
pods_unsorted
=()
local
i
local
i
for
i
in
$(
seq
1 10
)
;
do
for
i
in
$(
seq
1 10
)
;
do
pods_unsorted
=(
$(${
KUBEC
FG
}
\
pods_unsorted
=(
$(${
KUBEC
TL
}
get pods
-o
template
\
'-template={{range.items}}{{.id}} {{end}}'
\
'-
-
template={{range.items}}{{.id}} {{end}}'
\
-l
name
=
"
$1
"
list pods
)
)
-l
name
=
"
$1
"
)
)
found
=
"
${#
pods_unsorted
[*]
}
"
found
=
"
${#
pods_unsorted
[*]
}
"
if
[[
"
${
found
}
"
==
"
$2
"
]]
;
then
if
[[
"
${
found
}
"
==
"
$2
"
]]
;
then
break
break
...
@@ -183,7 +183,7 @@ function wait_for_pods() {
...
@@ -183,7 +183,7 @@ function wait_for_pods() {
echo
"Waiting for
${
pods_needed
}
pods to become 'running'"
echo
"Waiting for
${
pods_needed
}
pods to become 'running'"
pods_needed
=
"
$2
"
pods_needed
=
"
$2
"
for
id
in
${
pods_sorted
}
;
do
for
id
in
${
pods_sorted
}
;
do
status
=
$(${
KUBEC
FG
}
-template
'{{.currentState.status}}'
get
"pods/
${
id
}
"
)
status
=
$(${
KUBEC
TL
}
get pods
"
${
id
}
"
-o
template
--template
=
'{{.currentState.status}}'
)
if
[[
"
${
status
}
"
==
"Running"
]]
;
then
if
[[
"
${
status
}
"
==
"Running"
]]
;
then
pods_needed
=
$((
pods_needed-1
))
pods_needed
=
$((
pods_needed-1
))
fi
fi
...
@@ -289,13 +289,13 @@ test_node="${MINION_NAMES[0]}"
...
@@ -289,13 +289,13 @@ test_node="${MINION_NAMES[0]}"
master
=
"
${
MASTER_NAME
}
"
master
=
"
${
MASTER_NAME
}
"
# Launch some pods and services.
# Launch some pods and services.
svc1_name
=
"service
1
"
svc1_name
=
"service
-
${
RANDOM
}
"
svc1_port
=
80
svc1_port
=
80
svc1_count
=
3
svc1_count
=
3
svc1_publics
=
"192.168.1.1 192.168.1.2"
svc1_publics
=
"192.168.1.1 192.168.1.2"
start_service
"
${
svc1_name
}
"
"
${
svc1_port
}
"
"
${
svc1_count
}
"
"
${
svc1_publics
}
"
start_service
"
${
svc1_name
}
"
"
${
svc1_port
}
"
"
${
svc1_count
}
"
"
${
svc1_publics
}
"
svc2_name
=
"service
2
"
svc2_name
=
"service
-
${
RANDOM
}
"
svc2_port
=
80
svc2_port
=
80
svc2_count
=
3
svc2_count
=
3
start_service
"
${
svc2_name
}
"
"
${
svc2_port
}
"
"
${
svc2_count
}
"
start_service
"
${
svc2_name
}
"
"
${
svc2_port
}
"
"
${
svc2_count
}
"
...
...
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