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
442a22d1
Commit
442a22d1
authored
Sep 02, 2015
by
He Simei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tear down resources before tear down the cluster
parent
8cc75a47
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
0 deletions
+13
-0
common.sh
cluster/common.sh
+10
-0
util.sh
cluster/ubuntu/util.sh
+3
-0
No files found.
cluster/common.sh
View file @
442a22d1
...
@@ -117,6 +117,15 @@ function clear-kubeconfig() {
...
@@ -117,6 +117,15 @@ function clear-kubeconfig() {
echo
"Cleared config for
${
CONTEXT
}
from
${
KUBECONFIG
}
"
echo
"Cleared config for
${
CONTEXT
}
from
${
KUBECONFIG
}
"
}
}
function
tear_down_alive_resources
()
{
local
kubectl
=
"
${
KUBE_ROOT
}
/cluster/kubectl.sh"
"
${
kubectl
}
"
delete rc
--all
"
${
kubectl
}
"
delete pods
--all
"
${
kubectl
}
"
delete svc
--all
"
${
kubectl
}
"
delete pvc
--all
}
# Gets username, password for the current-context in kubeconfig, if they exist.
# Gets username, password for the current-context in kubeconfig, if they exist.
# Assumed vars:
# Assumed vars:
# KUBECONFIG # if unset, defaults to global
# KUBECONFIG # if unset, defaults to global
...
@@ -278,3 +287,4 @@ function tars_from_version() {
...
@@ -278,3 +287,4 @@ function tars_from_version() {
exit
1
exit
1
fi
fi
}
}
cluster/ubuntu/util.sh
View file @
442a22d1
...
@@ -409,6 +409,9 @@ function provision-masterandminion() {
...
@@ -409,6 +409,9 @@ function provision-masterandminion() {
function
kube-down
{
function
kube-down
{
KUBE_ROOT
=
$(
dirname
"
${
BASH_SOURCE
}
"
)
/../..
KUBE_ROOT
=
$(
dirname
"
${
BASH_SOURCE
}
"
)
/../..
source
"
${
KUBE_ROOT
}
/cluster/ubuntu/
${
KUBE_CONFIG_FILE
-
"config-default.sh"
}
"
source
"
${
KUBE_ROOT
}
/cluster/ubuntu/
${
KUBE_CONFIG_FILE
-
"config-default.sh"
}
"
source
"
${
KUBE_ROOT
}
/cluster/common.sh"
tear_down_alive_resources
ii
=
0
ii
=
0
for
i
in
${
nodes
}
;
do
for
i
in
${
nodes
}
;
do
...
...
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