Created
May 2, 2016 23:32
-
-
Save rafaeltuelho/100d7d4cb8353e0b57e99d3ba0825afd to your computer and use it in GitHub Desktop.
Simple bash script to cleanup the Cluster Metrics components from openshift-infra project
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
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 }'); \ | |
do | |
oc delete secret $i; \ | |
done | |
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 \ | |
hawkular-support | |
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