summaryrefslogtreecommitdiffstats
path: root/roles/openshift_metrics/tasks/uninstall_hosa.yaml
diff options
context:
space:
mode:
authorOpenShift Bot <eparis+openshiftbot@redhat.com>2017-06-14 18:00:00 -0400
committerGitHub <noreply@github.com>2017-06-14 18:00:00 -0400
commit6790ffaebdc6349d844ab3fdc3b3a58e56d63384 (patch)
tree931f4bbd721afae2519d477d5fcbe15b53dc935a /roles/openshift_metrics/tasks/uninstall_hosa.yaml
parent4f129045b3f3c1b22203a7ab68cda15ee4b8d87b (diff)
parentde5c01fffd9215d5f2baff63baa2ccc8fa47c812 (diff)
downloadopenshift-6790ffaebdc6349d844ab3fdc3b3a58e56d63384.tar.gz
openshift-6790ffaebdc6349d844ab3fdc3b3a58e56d63384.tar.bz2
openshift-6790ffaebdc6349d844ab3fdc3b3a58e56d63384.tar.xz
openshift-6790ffaebdc6349d844ab3fdc3b3a58e56d63384.zip
Merge pull request #4377 from mwringe/hawkular_openshift_agent
Merged by openshift-bot
Diffstat (limited to 'roles/openshift_metrics/tasks/uninstall_hosa.yaml')
-rw-r--r--roles/openshift_metrics/tasks/uninstall_hosa.yaml15
1 files changed, 15 insertions, 0 deletions
diff --git a/roles/openshift_metrics/tasks/uninstall_hosa.yaml b/roles/openshift_metrics/tasks/uninstall_hosa.yaml
new file mode 100644
index 000000000..42ed02460
--- /dev/null
+++ b/roles/openshift_metrics/tasks/uninstall_hosa.yaml
@@ -0,0 +1,15 @@
+---
+- name: remove Hawkular Agent (HOSA) components
+ command: >
+ {{ openshift.common.client_binary }} -n {{ openshift_metrics_hawkular_agent_namespace }} --config={{ mktemp.stdout }}/admin.kubeconfig
+ delete --ignore-not-found --selector=metrics-infra=agent
+ all,sa,secrets,templates,routes,pvc,rolebindings,clusterrolebindings
+ register: delete_metrics
+ changed_when: delete_metrics.stdout != 'No resources found'
+
+- name: remove rolebindings
+ command: >
+ {{ openshift.common.client_binary }} -n {{ openshift_metrics_hawkular_agent_namespace }} --config={{ mktemp.stdout }}/admin.kubeconfig
+ delete --ignore-not-found
+ clusterrolebinding/hawkular-openshift-agent-rb
+ changed_when: delete_metrics.stdout != 'No resources found'