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
57c5a5e4
Commit
57c5a5e4
authored
Sep 23, 2015
by
Eric Tune
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #14333 from roberthbailey/gke-e2e-firewall-names
Use the cluster name instead of the minion tag as the prefix for the firewall rules created in gke e2e tests
parents
8d2d42a8
69c98722
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
7 deletions
+4
-7
util.sh
cluster/gke/util.sh
+4
-7
No files found.
cluster/gke/util.sh
View file @
57c5a5e4
...
...
@@ -175,14 +175,14 @@ function test-setup() {
# Open up port 80 & 8080 so common containers on minions can be reached.
"
${
GCLOUD
}
"
compute firewall-rules create
\
"
${
MINION_TAG
}
-http-alt"
\
"
${
CLUSTER_NAME
}
-http-alt"
\
--allow
tcp:80,tcp:8080
\
--project
"
${
PROJECT
}
"
\
--target-tags
"
${
MINION_TAG
}
,
${
OLD_MINION_TAG
}
"
\
--network
=
"
${
NETWORK
}
"
"
${
GCLOUD
}
"
compute firewall-rules create
\
"
${
MINION_TAG
}
-nodeports"
\
"
${
CLUSTER_NAME
}
-nodeports"
\
--allow
tcp:30000-32767,udp:30000-32767
\
--project
"
${
PROJECT
}
"
\
--target-tags
"
${
MINION_TAG
}
,
${
OLD_MINION_TAG
}
"
\
...
...
@@ -294,15 +294,12 @@ function test-teardown() {
echo
"... in gke:test-teardown()"
>
&2
detect-project
>
&2
detect-minions
>
&2
# At this point, CLUSTER_NAME should have been used, so its value is final.
MINION_TAG
=
$(
$GCLOUD
compute instances describe
${
MINION_NAMES
[0]
}
--project
=
"
${
PROJECT
}
"
--zone
=
"
${
ZONE
}
"
|
grep
-o
"gke-
${
CLUSTER_NAME
}
-.
\{
8
\}
-node"
|
head
-1
)
# First, remove anything we did with test-setup (currently, the firewall).
# NOTE: Keep in sync with names above in test-setup.
"
${
GCLOUD
}
"
compute firewall-rules delete
"
${
MINION_TAG
}
-http-alt"
\
"
${
GCLOUD
}
"
compute firewall-rules delete
"
${
CLUSTER_NAME
}
-http-alt"
\
--project
=
"
${
PROJECT
}
"
||
true
"
${
GCLOUD
}
"
compute firewall-rules delete
"
${
MINION_TAG
}
-nodeports"
\
"
${
GCLOUD
}
"
compute firewall-rules delete
"
${
CLUSTER_NAME
}
-nodeports"
\
--project
=
"
${
PROJECT
}
"
||
true
# Then actually turn down the cluster.
...
...
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