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
b1465aee
Commit
b1465aee
authored
Jun 15, 2015
by
Fabio Yeon
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #9738 from quinton-hoole/2015-06-12-fix-e2e-projects
Add missing gcloud --project flags introduced by PR #9016
parents
18a39325
58885c7b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
+11
-11
util.sh
cluster/gce/util.sh
+11
-11
No files found.
cluster/gce/util.sh
View file @
b1465aee
...
@@ -755,7 +755,7 @@ function kube-down {
...
@@ -755,7 +755,7 @@ function kube-down {
while
[[
"
$deleteCmdStatus
"
!=
"DONE"
]]
while
[[
"
$deleteCmdStatus
"
!=
"DONE"
]]
do
do
sleep
5
sleep
5
deleteCmdOperationOutput
=
$(
gcloud preview managed-instance-groups
--zone
"
${
ZONE
}
"
get-operation
$deleteCmdOperationId
)
deleteCmdOperationOutput
=
$(
gcloud preview managed-instance-groups
--zone
"
${
ZONE
}
"
--project
"
${
PROJECT
}
"
get-operation
$deleteCmdOperationId
)
deleteCmdStatus
=
$(
echo
$deleteCmdOperationOutput
|
grep
-i
"status:"
|
sed
"s/.*status:[[:space:]]*
\(
[^[:space:]]*
\)
.*/
\1
/g"
)
deleteCmdStatus
=
$(
echo
$deleteCmdOperationOutput
|
grep
-i
"status:"
|
sed
"s/.*status:[[:space:]]*
\(
[^[:space:]]*
\)
.*/
\1
/g"
)
echo
"Waiting for MIG deletion to complete. Current status: "
$deleteCmdStatus
echo
"Waiting for MIG deletion to complete. Current status: "
$deleteCmdStatus
done
done
...
@@ -763,7 +763,7 @@ function kube-down {
...
@@ -763,7 +763,7 @@ function kube-down {
fi
fi
fi
fi
if
gcloud compute instance-templates describe
"
${
NODE_INSTANCE_PREFIX
}
-template"
&>/dev/null
;
then
if
gcloud compute instance-templates describe
--project
"
${
PROJECT
}
"
"
${
NODE_INSTANCE_PREFIX
}
-template"
&>/dev/null
;
then
gcloud compute instance-templates delete
\
gcloud compute instance-templates delete
\
--project
"
${
PROJECT
}
"
\
--project
"
${
PROJECT
}
"
\
--quiet
\
--quiet
\
...
@@ -771,7 +771,7 @@ function kube-down {
...
@@ -771,7 +771,7 @@ function kube-down {
fi
fi
# First delete the master (if it exists).
# First delete the master (if it exists).
if
gcloud compute instances describe
"
${
MASTER_NAME
}
"
--zone
"
${
ZONE
}
"
&>/dev/null
;
then
if
gcloud compute instances describe
"
${
MASTER_NAME
}
"
--zone
"
${
ZONE
}
"
--project
"
${
PROJECT
}
"
&>/dev/null
;
then
gcloud compute instances delete
\
gcloud compute instances delete
\
--project
"
${
PROJECT
}
"
\
--project
"
${
PROJECT
}
"
\
--quiet
\
--quiet
\
...
@@ -781,7 +781,7 @@ function kube-down {
...
@@ -781,7 +781,7 @@ function kube-down {
fi
fi
# Delete the master pd (possibly leaked by kube-up if master create failed).
# Delete the master pd (possibly leaked by kube-up if master create failed).
if
gcloud compute disks describe
"
${
MASTER_NAME
}
"
-pd
--zone
"
${
ZONE
}
"
&>/dev/null
;
then
if
gcloud compute disks describe
"
${
MASTER_NAME
}
"
-pd
--zone
"
${
ZONE
}
"
--project
"
${
PROJECT
}
"
&>/dev/null
;
then
gcloud compute disks delete
\
gcloud compute disks delete
\
--project
"
${
PROJECT
}
"
\
--project
"
${
PROJECT
}
"
\
--quiet
\
--quiet
\
...
@@ -808,7 +808,7 @@ function kube-down {
...
@@ -808,7 +808,7 @@ function kube-down {
done
done
# Delete firewall rule for the master.
# Delete firewall rule for the master.
if
gcloud compute firewall-rules describe
"
${
MASTER_NAME
}
-https"
&>/dev/null
;
then
if
gcloud compute firewall-rules describe
--project
"
${
PROJECT
}
"
"
${
MASTER_NAME
}
-https"
&>/dev/null
;
then
gcloud compute firewall-rules delete
\
gcloud compute firewall-rules delete
\
--project
"
${
PROJECT
}
"
\
--project
"
${
PROJECT
}
"
\
--quiet
\
--quiet
\
...
@@ -816,7 +816,7 @@ function kube-down {
...
@@ -816,7 +816,7 @@ function kube-down {
fi
fi
# Delete firewall rule for minions.
# Delete firewall rule for minions.
if
gcloud compute firewall-rules describe
"
${
MINION_TAG
}
-all"
&>/dev/null
;
then
if
gcloud compute firewall-rules describe
"
${
PROJECT
}
"
"
${
MINION_TAG
}
-all"
&>/dev/null
;
then
gcloud compute firewall-rules delete
\
gcloud compute firewall-rules delete
\
--project
"
${
PROJECT
}
"
\
--project
"
${
PROJECT
}
"
\
--quiet
\
--quiet
\
...
@@ -840,7 +840,7 @@ function kube-down {
...
@@ -840,7 +840,7 @@ function kube-down {
# Delete the master's reserved IP
# Delete the master's reserved IP
local
REGION
=
${
ZONE
%-*
}
local
REGION
=
${
ZONE
%-*
}
if
gcloud compute addresses describe
"
${
MASTER_NAME
}
-ip"
--region
"
${
REGION
}
"
&>/dev/null
;
then
if
gcloud compute addresses describe
"
${
MASTER_NAME
}
-ip"
--region
"
${
REGION
}
"
--project
"
${
PROJECT
}
"
&>/dev/null
;
then
gcloud compute addresses delete
\
gcloud compute addresses delete
\
--project
"
${
PROJECT
}
"
\
--project
"
${
PROJECT
}
"
\
--region
"
${
REGION
}
"
\
--region
"
${
REGION
}
"
\
...
@@ -996,11 +996,11 @@ function test-setup {
...
@@ -996,11 +996,11 @@ function test-setup {
"
${
MINION_TAG
}
-
${
INSTANCE_PREFIX
}
-http-alt"
2> /dev/null
||
true
"
${
MINION_TAG
}
-
${
INSTANCE_PREFIX
}
-http-alt"
2> /dev/null
||
true
# As there is no simple way to wait longer for this operation we need to manually
# As there is no simple way to wait longer for this operation we need to manually
# wait some additional time (20 minutes altogether).
# wait some additional time (20 minutes altogether).
until
gcloud compute firewall-rules describe
"
${
MINION_TAG
}
-
${
INSTANCE_PREFIX
}
-http-alt"
2> /dev/null
||
[
$((
$start
+
1200
))
-lt
`
date
+%s
`
]
until
gcloud compute firewall-rules describe
--project
"
${
PROJECT
}
"
"
${
MINION_TAG
}
-
${
INSTANCE_PREFIX
}
-http-alt"
2> /dev/null
||
[
$((
$start
+
1200
))
-lt
`
date
+%s
`
]
do
sleep
5
do
sleep
5
done
done
# Check if the firewall rule exists and fail if it does not.
# Check if the firewall rule exists and fail if it does not.
gcloud compute firewall-rules describe
"
${
MINION_TAG
}
-
${
INSTANCE_PREFIX
}
-http-alt"
gcloud compute firewall-rules describe
--project
"
${
PROJECT
}
"
"
${
MINION_TAG
}
-
${
INSTANCE_PREFIX
}
-http-alt"
# Open up the NodePort range
# Open up the NodePort range
# TODO(justinsb): Move to main setup, if we decide whether we want to do this by default.
# TODO(justinsb): Move to main setup, if we decide whether we want to do this by default.
...
@@ -1013,11 +1013,11 @@ function test-setup {
...
@@ -1013,11 +1013,11 @@ function test-setup {
"
${
MINION_TAG
}
-
${
INSTANCE_PREFIX
}
-nodeports"
2> /dev/null
||
true
"
${
MINION_TAG
}
-
${
INSTANCE_PREFIX
}
-nodeports"
2> /dev/null
||
true
# As there is no simple way to wait longer for this operation we need to manually
# As there is no simple way to wait longer for this operation we need to manually
# wait some additional time (20 minutes altogether).
# wait some additional time (20 minutes altogether).
until
gcloud compute firewall-rules describe
"
${
MINION_TAG
}
-
${
INSTANCE_PREFIX
}
-nodeports"
2> /dev/null
||
[
$((
$start
+
1200
))
-lt
`
date
+%s
`
]
until
gcloud compute firewall-rules describe
--project
"
${
PROJECT
}
"
"
${
MINION_TAG
}
-
${
INSTANCE_PREFIX
}
-nodeports"
2> /dev/null
||
[
$((
$start
+
1200
))
-lt
`
date
+%s
`
]
do
sleep
5
do
sleep
5
done
done
# Check if the firewall rule exists and fail if it does not.
# Check if the firewall rule exists and fail if it does not.
gcloud compute firewall-rules describe
"
${
MINION_TAG
}
-
${
INSTANCE_PREFIX
}
-nodeports"
gcloud compute firewall-rules describe
--project
"
${
PROJECT
}
"
"
${
MINION_TAG
}
-
${
INSTANCE_PREFIX
}
-nodeports"
}
}
# Execute after running tests to perform any required clean-up. This is called
# Execute after running tests to perform any required clean-up. This is called
...
...
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