Skip to content

Commit

Permalink
add wait timeout for delete (#1375)
Browse files Browse the repository at this point in the history
Signed-off-by: Allen Li <[email protected]>
  • Loading branch information
qpdpQ authored Jul 18, 2023
1 parent 9212ad1 commit 5291239
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions cp3pt0-deployment/uninstall_tenant.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,11 @@ function main() {
trap cleanup_log EXIT
pre_req
set_tenant_namespaces
uninstall_odlm
uninstall_cs_operator
uninstall_nss
if [ $FORCE_DELETE -eq 0 ]; then
uninstall_odlm
uninstall_cs_operator
uninstall_nss
fi
delete_rbac_resource
delete_webhook
delete_unavailable_apiservice
Expand Down Expand Up @@ -175,7 +177,7 @@ function uninstall_odlm() {
for ns in ${TENANT_NAMESPACES//,/ }; do
local opreq=$(${OC} get -n "$ns" operandrequests --no-headers | cut -d ' ' -f1)
if [ "$opreq" != "" ]; then
${OC} delete -n "$ns" operandrequests ${opreq//$'\n'/ }
${OC} delete -n "$ns" operandrequests ${opreq//$'\n'/ } --timeout=30s
fi
grep_args="${grep_args}-e $ns "
done
Expand Down Expand Up @@ -230,7 +232,7 @@ function uninstall_nss() {
title "Uninstall ibm-namespace-scope-operator"

for ns in ${TENANT_NAMESPACES//,/ }; do
${OC} delete --ignore-not-found nss -n "$ns" common-service
${OC} delete --ignore-not-found nss -n "$ns" common-service --timeout=30s
for op_ns in ${OPERATOR_NS_LIST//,/ }; do
${OC} delete --ignore-not-found rolebinding -n "$ns" "nss-managed-role-from-$op_ns"
${OC} delete --ignore-not-found role -n "$ns" "nss-managed-role-from-$op_ns"
Expand Down

0 comments on commit 5291239

Please sign in to comment.