Skip to content

Instantly share code, notes, and snippets.

@abdennour
Last active January 9, 2024 08:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abdennour/0a79bb11f7a45eeef902d96cd1d37718 to your computer and use it in GitHub Desktop.
Save abdennour/0a79bb11f7a45eeef902d96cd1d37718 to your computer and use it in GitHub Desktop.
Clean ACS Operator from SecuredCluster in Openshift
oc -n stackrox delete securedcluster --all
oc -n stackrox delete pvc --all
oc delete ns stackrox
oc get clusterrole,clusterrolebinding,role,rolebinding -o name | grep stackrox | xargs oc delete --wait
oc delete ValidatingWebhookConfiguration stackrox
oc delete scc -l "app.kubernetes.io/name=stackrox"
oc project rhacs-operator
oc delete sub rhacs-operator
oc delete csv $(oc get csv | grep rhacs | awk '{print $1}')
oc delete crd centrals.platform.stackrox.io
oc delete crd securedclusters.platform.stackrox.io
oc scale deployment -n openshift-operator-lifecycle-manager olm-operator --replicas=0
oc delete operator rhacs-operator.rhacs-operator
oc scale deployment -n openshift-operator-lifecycle-manager olm-operator --replicas=1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment