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
58c89925
Commit
58c89925
authored
Sep 16, 2016
by
Jerzy Szczepkowski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implemented KUBE_DELETE_NODES flag in kube-down.
Implemented KUBE_DELETE_NODES flag in kube-down script. It prevents removal of nodes when shutting down a HA master replica.
parent
8f4c0bbc
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
0 deletions
+6
-0
config-default.sh
cluster/gce/config-default.sh
+1
-0
config-test.sh
cluster/gce/config-test.sh
+1
-0
util.sh
cluster/gce/util.sh
+4
-0
No files found.
cluster/gce/config-default.sh
View file @
58c89925
...
@@ -34,6 +34,7 @@ NODE_DISK_SIZE=${NODE_DISK_SIZE:-100GB}
...
@@ -34,6 +34,7 @@ NODE_DISK_SIZE=${NODE_DISK_SIZE:-100GB}
REGISTER_MASTER_KUBELET
=
${
REGISTER_MASTER
:-
true
}
REGISTER_MASTER_KUBELET
=
${
REGISTER_MASTER
:-
true
}
PREEMPTIBLE_NODE
=
${
PREEMPTIBLE_NODE
:-
false
}
PREEMPTIBLE_NODE
=
${
PREEMPTIBLE_NODE
:-
false
}
PREEMPTIBLE_MASTER
=
${
PREEMPTIBLE_MASTER
:-
false
}
PREEMPTIBLE_MASTER
=
${
PREEMPTIBLE_MASTER
:-
false
}
KUBE_DELETE_NODES
=
${
KUBE_DELETE_NODES
:-
true
}
MASTER_OS_DISTRIBUTION
=
${
KUBE_MASTER_OS_DISTRIBUTION
:-${
KUBE_OS_DISTRIBUTION
:-
gci
}}
MASTER_OS_DISTRIBUTION
=
${
KUBE_MASTER_OS_DISTRIBUTION
:-${
KUBE_OS_DISTRIBUTION
:-
gci
}}
NODE_OS_DISTRIBUTION
=
${
KUBE_NODE_OS_DISTRIBUTION
:-${
KUBE_OS_DISTRIBUTION
:-
gci
}}
NODE_OS_DISTRIBUTION
=
${
KUBE_NODE_OS_DISTRIBUTION
:-${
KUBE_OS_DISTRIBUTION
:-
gci
}}
...
...
cluster/gce/config-test.sh
View file @
58c89925
...
@@ -35,6 +35,7 @@ REGISTER_MASTER_KUBELET=${REGISTER_MASTER:-true}
...
@@ -35,6 +35,7 @@ REGISTER_MASTER_KUBELET=${REGISTER_MASTER:-true}
KUBE_APISERVER_REQUEST_TIMEOUT
=
300
KUBE_APISERVER_REQUEST_TIMEOUT
=
300
PREEMPTIBLE_NODE
=
${
PREEMPTIBLE_NODE
:-
false
}
PREEMPTIBLE_NODE
=
${
PREEMPTIBLE_NODE
:-
false
}
PREEMPTIBLE_MASTER
=
${
PREEMPTIBLE_MASTER
:-
false
}
PREEMPTIBLE_MASTER
=
${
PREEMPTIBLE_MASTER
:-
false
}
KUBE_DELETE_NODES
=
${
KUBE_DELETE_NODES
:-
true
}
MASTER_OS_DISTRIBUTION
=
${
KUBE_MASTER_OS_DISTRIBUTION
:-${
KUBE_OS_DISTRIBUTION
:-
gci
}}
MASTER_OS_DISTRIBUTION
=
${
KUBE_MASTER_OS_DISTRIBUTION
:-${
KUBE_OS_DISTRIBUTION
:-
gci
}}
NODE_OS_DISTRIBUTION
=
${
KUBE_NODE_OS_DISTRIBUTION
:-${
KUBE_OS_DISTRIBUTION
:-
gci
}}
NODE_OS_DISTRIBUTION
=
${
KUBE_NODE_OS_DISTRIBUTION
:-${
KUBE_OS_DISTRIBUTION
:-
gci
}}
...
...
cluster/gce/util.sh
View file @
58c89925
...
@@ -1127,6 +1127,7 @@ function kube-down() {
...
@@ -1127,6 +1127,7 @@ function kube-down() {
echo
"Bringing down cluster"
echo
"Bringing down cluster"
set
+e
# Do not stop on error
set
+e
# Do not stop on error
if
[[
"
${
KUBE_DELETE_NODES
:-}
"
!=
"false"
]]
;
then
# Get the name of the managed instance group template before we delete the
# Get the name of the managed instance group template before we delete the
# managed instance group. (The name of the managed instance group template may
# managed instance group. (The name of the managed instance group template may
# change during a cluster upgrade.)
# change during a cluster upgrade.)
...
@@ -1155,6 +1156,7 @@ function kube-down() {
...
@@ -1155,6 +1156,7 @@ function kube-down() {
"
${
template
}
"
"
${
template
}
"
fi
fi
done
done
fi
local
-r
REPLICA_NAME
=
"
$(
get-replica-name
)
"
local
-r
REPLICA_NAME
=
"
$(
get-replica-name
)
"
...
@@ -1254,6 +1256,7 @@ function kube-down() {
...
@@ -1254,6 +1256,7 @@ function kube-down() {
fi
fi
fi
fi
if
[[
"
${
KUBE_DELETE_NODES
:-}
"
!=
"false"
]]
;
then
# Find out what minions are running.
# Find out what minions are running.
local
-a
minions
local
-a
minions
minions
=(
$(
gcloud compute instances list
\
minions
=(
$(
gcloud compute instances list
\
...
@@ -1271,6 +1274,7 @@ function kube-down() {
...
@@ -1271,6 +1274,7 @@ function kube-down() {
"
${
minions
[@]
::
${
batch
}}
"
"
${
minions
[@]
::
${
batch
}}
"
minions
=(
"
${
minions
[@]
:
${
batch
}}
"
)
minions
=(
"
${
minions
[@]
:
${
batch
}}
"
)
done
done
fi
# Delete routes.
# Delete routes.
local
-a
routes
local
-a
routes
...
...
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