30
30
# Phase 1: Delete domain resources with label 'weblogic.domainUID'.
31
31
#
32
32
# Phase 2: Delete wls operator with lable 'weblogic.operatorName' and
33
- # voyager operator with lable 'app= voyager' .
33
+ # delete voyager controller .
34
34
#
35
35
# Phase 3: Use a kubernetes job to delete the PV directories
36
36
# on the kubernetes cluster.
@@ -105,22 +105,27 @@ function deleteResWithLabel {
105
105
}
106
106
107
107
#
108
- # deleteOperators
108
+ # deleteWLSOperators
109
109
#
110
- function deleteOperators {
110
+ function deleteWLSOperators {
111
111
local tempfile=" /tmp/$( basename $0 ) .tmp.$$ " # == /tmp/[script-file-name].tmp.[pid]
112
112
# delete wls operator resources
113
113
LABEL_SELECTOR=" weblogic.operatorName"
114
114
# getResWithLabel $tempfile
115
115
deleteResWithLabel $tempfile
116
+ }
116
117
117
- # delete voyager operator resources
118
- LABEL_SELECTOR=" app=voyager"
119
- # getResWithLabel $tempfile
120
- deleteResWithLabel $tempfile
118
+ #
119
+ # deleteVoyagerController
120
+ #
121
+ function deleteVoyagerController {
122
+ curl -fsSL https://raw.githubusercontent.com/appscode/voyager/6.0.0/hack/deploy/voyager.sh \
123
+ | bash -s -- --provider=baremetal --namespace=voyager --uninstall --purge
121
124
}
122
125
123
126
echo @@ Starting cleanup.
127
+ script=" ${BASH_SOURCE[0]} "
128
+ scriptDir=" $( cd " $( dirname " ${script} " ) " > /dev/null 2>&1 ; pwd -P) "
124
129
125
130
echo " @@ RESULT_ROOT=$RESULT_ROOT TMP_DIR=$TMP_DIR RESULT_DIR=$RESULT_DIR PROJECT_ROOT=$PROJECT_ROOT "
126
131
@@ -130,10 +135,13 @@ NAMESPACED_TYPES="pod,job,deploy,rs,service,pvc,ingress,cm,serviceaccount,role,r
130
135
NOT_NAMESPACED_TYPES=" pv,crd,clusterroles,clusterrolebindings"
131
136
132
137
# Delele domain resources.
133
- ../../../kubernetes/delete-weblogic-domain-resources.sh -d all
138
+ ${scriptDir} /../../../kubernetes/delete-weblogic-domain-resources.sh -d all
139
+
140
+ # Delete wls operator
141
+ deleteWLSOperators
134
142
135
- # Delete wls operator and voyager operator
136
- deleteOperators
143
+ # Delete voyager controller
144
+ deleteVoyagerController
137
145
138
146
# Delete pv directories using a job (/scratch maps to PV_ROOT on the k8s cluster machines).
139
147
166
174
167
175
echo @@ Exiting with status $SUCCESS
168
176
exit $SUCCESS
177
+
0 commit comments