Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Simple bash script to cleanup the Cluster Metrics components from openshift-infra project
echo -e "\n --- \n deleting project objects... \n --- \n"
oc project openshift-infra
for i in $(oc get secret | egrep "(hawkular|heapster|metrics)" | awk '{ print $1 }'); \
oc delete secret $i; \
oc delete rc hawkular-metrics heapster hawkular-cassandra-1
oc delete svc \
hawkular-cassandra \
hawkular-cassandra-nodes \
hawkular-metrics heapster
oc delete route hawkular-metrics
oc delete sa cassandra hawkular heapster metrics-deployer
oc delete template \
hawkular-cassandra-node-emptydir \
hawkular-cassandra-node-pv \
hawkular-cassandra-services \
hawkular-heapster hawkular-metrics \
oc delete pvc metrics-cassandra-1
echo -e "\n --- \n finish! \n --- \n"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.