FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
secureCodeBox/bin/uninstall.sh at main · secureCodeBox/secureCodeBox · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
secureCodeBox
/
secureCodeBox
Public
Notifications
You must be signed in to change notification settings
Fork
183
Star
985
Code
Issues
62
Pull requests
3
Discussions
Actions
Projects
Security and quality
1
Insights
Additional navigation options
Code
Issues
Pull requests
Discussions
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
secureCodeBox
/
bin
/
uninstall.sh
Copy path
More file actions
More file actions
Latest commit
History
History
History
executable file
·
50 lines (38 loc) · 1.37 KB
Breadcrumbs
secureCodeBox
/
bin
/
uninstall.sh
Copy path
File metadata and controls
executable file
·
50 lines (38 loc) · 1.37 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!
/usr/bin/env bash
#
SPDX-FileCopyrightText: the secureCodeBox authors
#
#
SPDX-License-Identifier: Apache-2.0
#
Official uninstall script for the secureCodeBox
#
#
Removes all available resources (scanners, demo-targets, hooks, operator) and namespaces
#
#
For more information see https://www.securecodebox.io/
set
-eu
shopt
-s extglob
#
@see: http://wiki.bash-hackers.org/syntax/shellvars
[
-z
"
${SCRIPT_DIRECTORY
:-
}
"
]
&&
SCRIPT_DIRECTORY=
"
$(
cd
"
$(
dirname
"
${BASH_SOURCE[0]}
"
)
"
>
/dev/null
&&
pwd
)
"
BASE_DIR=
$(
dirname
"
${SCRIPT_DIRECTORY}
"
)
SCB_SYSTEM_NAMESPACE=
'
securecodebox-system
'
SCB_DEMO_NAMESPACE=
'
demo-targets
'
SCB_NAMESPACE=
'
default
'
function
uninstallResources()
{
local
resource_directory=
"
$1
"
local
namespace=
"
$2
"
local
resources=()
for
path
in
"
$resource_directory
"
/
*
;
do
[
-d
"
${path}
"
]
||
continue
#
skip if not a directory
local
directory
directory=
"
$(
basename
"
${path}
"
)
"
resources+=(
"
${directory}
"
)
done
for
resource
in
"
${resources[@]}
"
;
do
helm uninstall
"
$resource
"
-n
"
$namespace
"
||
true
done
}
helm -n
"
$SCB_SYSTEM_NAMESPACE
"
uninstall securecodebox-operator
||
true
uninstallResources
"
$BASE_DIR
/demo-targets
"
"
$SCB_DEMO_NAMESPACE
"
uninstallResources
"
$BASE_DIR
/scanners
"
"
$SCB_NAMESPACE
"
uninstallResources
"
$BASE_DIR
/hooks
"
"
$SCB_NAMESPACE
"
kubectl delete namespaces
"
$SCB_SYSTEM_NAMESPACE
"
||
true
echo
"
Uninstall completed
"
Back
|
FazBrowse Home
|
New Git URL