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
5b771494
Commit
5b771494
authored
Mar 20, 2015
by
Fabio Yeon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix guestbook.sh to make it work on GKE.
parent
ef758881
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
6 deletions
+10
-6
config-test.sh
cluster/gke/config-test.sh
+2
-0
guestbook.sh
hack/e2e-suite/guestbook.sh
+8
-6
No files found.
cluster/gke/config-test.sh
View file @
5b771494
...
@@ -17,6 +17,8 @@
...
@@ -17,6 +17,8 @@
# The following are test-specific settings.
# The following are test-specific settings.
CLUSTER_NAME
=
"
${
CLUSTER_NAME
:-${
USER
}
-gke-e2e
}
"
CLUSTER_NAME
=
"
${
CLUSTER_NAME
:-${
USER
}
-gke-e2e
}
"
NETWORK
=
${
KUBE_GKE_NETWORK
:-
e2e
}
NETWORK
=
${
KUBE_GKE_NETWORK
:-
e2e
}
MINION_TAG
=
"k8s-
${
CLUSTER_NAME
}
-node"
# For ease of maintenance, extract any pieces that do not vary between default
# For ease of maintenance, extract any pieces that do not vary between default
# and test in a common config.
# and test in a common config.
...
...
hack/e2e-suite/guestbook.sh
View file @
5b771494
...
@@ -37,11 +37,13 @@ GUESTBOOK="${KUBE_ROOT}/examples/guestbook"
...
@@ -37,11 +37,13 @@ GUESTBOOK="${KUBE_ROOT}/examples/guestbook"
function
teardown
()
{
function
teardown
()
{
${
KUBECTL
}
stop
-f
"
${
GUESTBOOK
}
"
${
KUBECTL
}
stop
-f
"
${
GUESTBOOK
}
"
if
[[
"
${
KUBERNETES_PROVIDER
}
"
==
"gce"
]]
;
then
if
[[
"
${
KUBERNETES_PROVIDER
}
"
==
"gce"
]]
||
[[
"
${
KUBERNETES_PROVIDER
}
"
==
"gke"
]]
;
then
local
REGION
=
${
ZONE
%-*
}
local
REGION
=
${
ZONE
%-*
}
gcloud compute forwarding-rules delete
-q
--region
${
REGION
}
"
${
INSTANCE_PREFIX
}
-default-frontend"
||
true
if
[[
"
${
KUBERNETES_PROVIDER
}
"
==
"gce"
]]
;
then
gcloud compute target-pools delete
-q
--region
${
REGION
}
"
${
INSTANCE_PREFIX
}
-default-frontend"
||
true
gcloud compute forwarding-rules delete
-q
--project
=
"
${
PROJECT
}
"
--region
${
REGION
}
"
${
INSTANCE_PREFIX
}
-default-frontend"
||
true
gcloud compute firewall-rules delete guestbook-e2e-minion-8000
-q
||
true
gcloud compute target-pools delete
-q
--project
=
"
${
PROJECT
}
"
--region
${
REGION
}
"
${
INSTANCE_PREFIX
}
-default-frontend"
||
true
fi
gcloud compute firewall-rules delete guestbook-e2e-minion-8000
-q
--project
=
"
${
PROJECT
}
"
||
true
fi
fi
}
}
...
@@ -84,8 +86,8 @@ ${KUBECTL} create -f "${GUESTBOOK}"
...
@@ -84,8 +86,8 @@ ${KUBECTL} create -f "${GUESTBOOK}"
# Verify that all pods are running
# Verify that all pods are running
wait_for_running
wait_for_running
if
[[
"
${
KUBERNETES_PROVIDER
}
"
==
"gce"
]]
;
then
if
[[
"
${
KUBERNETES_PROVIDER
}
"
==
"gce"
]]
||
[[
"
${
KUBERNETES_PROVIDER
}
"
==
"gke"
]]
;
then
gcloud compute firewall-rules create
--allow
=
tcp:8000
--network
=
"
${
NETWORK
}
"
--target-tags
=
"
${
MINION_TAG
}
"
guestbook-e2e-minion-8000
gcloud compute firewall-rules create
--
project
=
"
${
PROJECT
}
"
--
allow
=
tcp:8000
--network
=
"
${
NETWORK
}
"
--target-tags
=
"
${
MINION_TAG
}
"
guestbook-e2e-minion-8000
fi
fi
# Add a new entry to the guestbook and verify that it was remembered
# Add a new entry to the guestbook and verify that it was remembered
...
...
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