uninstall_metrics.yaml 774 B

12345678910111213141516171819
  1. ---
  2. - name: stop metrics
  3. include: stop_metrics.yaml
  4. - name: remove metrics components
  5. command: >
  6. {{ openshift.common.client_binary }} -n {{ openshift_metrics_project }} --config={{ mktemp.stdout }}/admin.kubeconfig
  7. delete --ignore-not-found --selector=metrics-infra
  8. all,sa,secrets,templates,routes,pvc,rolebindings,clusterrolebindings
  9. register: delete_metrics
  10. changed_when: delete_metrics.stdout != 'No resources found'
  11. - name: remove rolebindings
  12. command: >
  13. {{ openshift.common.client_binary }} -n {{ openshift_metrics_project }} --config={{ mktemp.stdout }}/admin.kubeconfig
  14. delete --ignore-not-found
  15. rolebinding/hawkular-view
  16. clusterrolebinding/heapster-cluster-reader
  17. changed_when: delete_metrics.stdout != 'No resources found'