Skip to content

Commit

Permalink
Delete scc objects nuke scripts only, not uninstall (#97)
Browse files Browse the repository at this point in the history
* delete kui-proxy-scc via nuke script

* delete kui-proxy-scc via uninstall script

* revert removing kui-proxy-scc from uninstall.sh

* do not delete scc objects in uninstall script
  • Loading branch information
subbarao-meduri authored Jun 19, 2020
1 parent 9926ebf commit 762dffc
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
5 changes: 3 additions & 2 deletions acm-operator/uninstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,9 @@ oc delete crd applications.app.k8s.io --ignore-not-found
oc delete crd clusters.clusterregistry.k8s.io --ignore-not-found
oc get service | grep "multicluster" | awk '{ print $1 }' | xargs oc delete service --wait=false --ignore-not-found

oc get scc | grep "multicluster" | awk '{ print $1 }' | xargs oc delete scc --wait=false --ignore-not-found
oc get scc | grep "multicloud" | awk '{ print $1 }' | xargs oc delete scc --wait=false --ignore-not-found
# delete these objects via nuke script only
# oc get scc | grep "multicluster" | awk '{ print $1 }' | xargs oc delete scc --wait=false --ignore-not-found
# oc get scc | grep "multicloud" | awk '{ print $1 }' | xargs oc delete scc --wait=false --ignore-not-found

# Remove custom registry resources
oc delete catalogsource $custom_catalog_source --ignore-not-found
Expand Down
1 change: 1 addition & 0 deletions hack/nuke.sh
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ oc get csv | grep "etcd" | awk '{ print $1 }' | xargs oc delete csv --wait=false
oc get crd | grep "etcd" | awk '{ print $1 }' | xargs oc delete crd --wait=false --ignore-not-found || true
oc get scc | grep "multicluster" | awk '{ print $1 }' | xargs oc delete scc --wait=false --ignore-not-found || true
oc get scc | grep "multicloud" | awk '{ print $1 }' | xargs oc delete scc --wait=false --ignore-not-found || true
oc get scc | grep "kui-proxy" | awk '{ print $1 }' | xargs oc delete scc --wait=false --ignore-not-found || true
oc get crd | grep "certmanager" | awk '{ print $1 }' | xargs oc delete crd --wait=false --ignore-not-found || true
oc get crd | grep "mcm" | awk '{ print $1 }' | xargs oc delete crd --wait=false --ignore-not-found || true
oc get crd | grep "ibm" | awk '{ print $1 }' | xargs oc delete crd --wait=false --ignore-not-found || true
Expand Down
5 changes: 3 additions & 2 deletions multicluster-hub-operator/uninstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,9 @@ oc delete crd applications.app.k8s.io --ignore-not-found
oc delete crd clusters.clusterregistry.k8s.io --ignore-not-found
oc get service | grep "multicluster" | awk '{ print $1 }' | xargs oc delete service --wait=false --ignore-not-found

oc get scc | grep "multicluster" | awk '{ print $1 }' | xargs oc delete scc --wait=false --ignore-not-found
oc get scc | grep "multicloud" | awk '{ print $1 }' | xargs oc delete scc --wait=false --ignore-not-found
# Only delete these objects via nuke script
# oc get scc | grep "multicluster" | awk '{ print $1 }' | xargs oc delete scc --wait=false --ignore-not-found
# oc get scc | grep "multicloud" | awk '{ print $1 }' | xargs oc delete scc --wait=false --ignore-not-found

# Remove custom registry resources
oc delete catalogsource $custom_catalog_source --ignore-not-found
Expand Down

0 comments on commit 762dffc

Please sign in to comment.