uninstall_metrics.yaml 818 B

1234567891011121314151617181920
  1. ---
  2. - name: stop metrics
  3. include_tasks: stop_metrics.yaml
  4. - name: remove metrics components
  5. command: >
  6. {{ openshift_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,clusterrole
  9. register: delete_metrics
  10. changed_when: delete_metrics.stdout != 'No resources found'
  11. - name: remove rolebindings
  12. command: >
  13. {{ openshift_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. clusterrolebinding/hawkular-metrics
  18. changed_when: delete_metrics.stdout != 'No resources found'