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
f842b530
Commit
f842b530
authored
Dec 18, 2015
by
Wojciech Tyczynski
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #18889 from gmarek/fix-kube-down
Don't fail kube-down if no MIGs are present
parents
98e2ed66
e138ad3d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
util.sh
cluster/gce/util.sh
+5
-5
No files found.
cluster/gce/util.sh
View file @
f842b530
...
...
@@ -234,7 +234,7 @@ function upload-server-tars() {
function
detect-node-names
{
detect-project
INSTANCE_GROUPS
=()
INSTANCE_GROUPS+
=(
$(
gcloud compute instance-groups managed list
--zone
"
${
ZONE
}
"
--project
"
${
PROJECT
}
"
|
grep
${
NODE_INSTANCE_PREFIX
}
|
cut
-f1
-d
" "
)
)
INSTANCE_GROUPS+
=(
$(
gcloud compute instance-groups managed list
--zone
"
${
ZONE
}
"
--project
"
${
PROJECT
}
"
|
grep
${
NODE_INSTANCE_PREFIX
}
|
cut
-f1
-d
" "
||
true
)
)
NODE_NAMES
=()
if
[[
-n
"
${
INSTANCE_GROUPS
[@]
:-}
"
]]
;
then
for
group
in
"
${
INSTANCE_GROUPS
[@]
}
"
;
do
...
...
@@ -851,7 +851,7 @@ function kube-down {
|
grep
"
${
NODE_INSTANCE_PREFIX
}
-group"
\
|
awk
'{print $7}'
)
)
if
[[
"
${
autoscaler
:-}
"
==
"yes"
]]
;
then
for
group
in
${
INSTANCE_GROUPS
[@]
}
;
do
for
group
in
${
INSTANCE_GROUPS
[@]
:-
}
;
do
gcloud compute instance-groups managed stop-autoscaling
"
${
group
}
"
--zone
"
${
ZONE
}
"
--project
"
${
PROJECT
}
"
done
fi
...
...
@@ -863,7 +863,7 @@ function kube-down {
# The gcloud APIs don't return machine parseable error codes/retry information. Therefore the best we can
# do is parse the output and special case particular responses we are interested in.
for
group
in
${
INSTANCE_GROUPS
[@]
}
;
do
for
group
in
${
INSTANCE_GROUPS
[@]
:-}
;
do
if
gcloud compute instance-groups managed describe
"
${
group
}
"
--project
"
${
PROJECT
}
"
--zone
"
${
ZONE
}
"
&>/dev/null
;
then
deleteCmdOutput
=
$(
gcloud compute instance-groups managed delete
--zone
"
${
ZONE
}
"
\
--project
"
${
PROJECT
}
"
\
...
...
@@ -1126,7 +1126,7 @@ function prepare-push() {
create-node-instance-template
$tmp_template_name
local
template_name
=
"
${
NODE_INSTANCE_PREFIX
}
-template"
for
group
in
${
INSTANCE_GROUPS
[@]
}
;
do
for
group
in
${
INSTANCE_GROUPS
[@]
:-
}
;
do
gcloud compute instance-groups managed
\
set-instance-template
"
${
group
}
"
\
--template
"
$tmp_template_name
"
\
...
...
@@ -1141,7 +1141,7 @@ function prepare-push() {
create-node-instance-template
"
$template_name
"
for
group
in
${
INSTANCE_GROUPS
[@]
}
;
do
for
group
in
${
INSTANCE_GROUPS
[@]
:-
}
;
do
gcloud compute instance-groups managed
\
set-instance-template
"
${
group
}
"
\
--template
"
$template_name
"
\
...
...
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