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
e138ad3d
Commit
e138ad3d
authored
Dec 18, 2015
by
gmarek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't fail kube-down if no MIGs are present
parent
98e2ed66
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 @
e138ad3d
...
@@ -234,7 +234,7 @@ function upload-server-tars() {
...
@@ -234,7 +234,7 @@ function upload-server-tars() {
function
detect-node-names
{
function
detect-node-names
{
detect-project
detect-project
INSTANCE_GROUPS
=()
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
=()
NODE_NAMES
=()
if
[[
-n
"
${
INSTANCE_GROUPS
[@]
:-}
"
]]
;
then
if
[[
-n
"
${
INSTANCE_GROUPS
[@]
:-}
"
]]
;
then
for
group
in
"
${
INSTANCE_GROUPS
[@]
}
"
;
do
for
group
in
"
${
INSTANCE_GROUPS
[@]
}
"
;
do
...
@@ -851,7 +851,7 @@ function kube-down {
...
@@ -851,7 +851,7 @@ function kube-down {
|
grep
"
${
NODE_INSTANCE_PREFIX
}
-group"
\
|
grep
"
${
NODE_INSTANCE_PREFIX
}
-group"
\
|
awk
'{print $7}'
)
)
|
awk
'{print $7}'
)
)
if
[[
"
${
autoscaler
:-}
"
==
"yes"
]]
;
then
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
}
"
gcloud compute instance-groups managed stop-autoscaling
"
${
group
}
"
--zone
"
${
ZONE
}
"
--project
"
${
PROJECT
}
"
done
done
fi
fi
...
@@ -863,7 +863,7 @@ function kube-down {
...
@@ -863,7 +863,7 @@ function kube-down {
# The gcloud APIs don't return machine parseable error codes/retry information. Therefore the best we can
# 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.
# 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
if
gcloud compute instance-groups managed describe
"
${
group
}
"
--project
"
${
PROJECT
}
"
--zone
"
${
ZONE
}
"
&>/dev/null
;
then
deleteCmdOutput
=
$(
gcloud compute instance-groups managed delete
--zone
"
${
ZONE
}
"
\
deleteCmdOutput
=
$(
gcloud compute instance-groups managed delete
--zone
"
${
ZONE
}
"
\
--project
"
${
PROJECT
}
"
\
--project
"
${
PROJECT
}
"
\
...
@@ -1126,7 +1126,7 @@ function prepare-push() {
...
@@ -1126,7 +1126,7 @@ function prepare-push() {
create-node-instance-template
$tmp_template_name
create-node-instance-template
$tmp_template_name
local
template_name
=
"
${
NODE_INSTANCE_PREFIX
}
-template"
local
template_name
=
"
${
NODE_INSTANCE_PREFIX
}
-template"
for
group
in
${
INSTANCE_GROUPS
[@]
}
;
do
for
group
in
${
INSTANCE_GROUPS
[@]
:-
}
;
do
gcloud compute instance-groups managed
\
gcloud compute instance-groups managed
\
set-instance-template
"
${
group
}
"
\
set-instance-template
"
${
group
}
"
\
--template
"
$tmp_template_name
"
\
--template
"
$tmp_template_name
"
\
...
@@ -1141,7 +1141,7 @@ function prepare-push() {
...
@@ -1141,7 +1141,7 @@ function prepare-push() {
create-node-instance-template
"
$template_name
"
create-node-instance-template
"
$template_name
"
for
group
in
${
INSTANCE_GROUPS
[@]
}
;
do
for
group
in
${
INSTANCE_GROUPS
[@]
:-
}
;
do
gcloud compute instance-groups managed
\
gcloud compute instance-groups managed
\
set-instance-template
"
${
group
}
"
\
set-instance-template
"
${
group
}
"
\
--template
"
$template_name
"
\
--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