|
@@ -0,0 +1,56 @@
|
|
|
+---
|
|
|
+- shell: >
|
|
|
+ {{openshift.common.client_binary}}
|
|
|
+ --config={{mktemp.stdout}}/admin.kubeconfig
|
|
|
+ get rc
|
|
|
+ -l metrics-infra=heapster
|
|
|
+ -o name
|
|
|
+ -n {{openshift_metrics_project}}
|
|
|
+ register: metrics_heapster_rc
|
|
|
+ changed_when: "'No resources found' not in metrics_heapster_rc.stderr"
|
|
|
+ check_mode: no
|
|
|
+
|
|
|
+- name: Stop Heapster
|
|
|
+ include: scale.yaml
|
|
|
+ vars:
|
|
|
+ desired: 0
|
|
|
+ with_items: "{{metrics_heapster_rc.stdout_lines}}"
|
|
|
+ loop_control:
|
|
|
+ loop_var: object
|
|
|
+
|
|
|
+- shell: >
|
|
|
+ {{openshift.common.client_binary}}
|
|
|
+ --config={{mktemp.stdout}}/admin.kubeconfig
|
|
|
+ get rc
|
|
|
+ -l metrics-infra=hawkular-metrics
|
|
|
+ -o name
|
|
|
+ -n {{openshift_metrics_project}}
|
|
|
+ register: metrics_hawkular_rc
|
|
|
+ changed_when: "'No resources found' not in metrics_hawkular_rc.stderr"
|
|
|
+
|
|
|
+- name: Stop Hawkular Metrics
|
|
|
+ include: scale.yaml
|
|
|
+ vars:
|
|
|
+ desired: 0
|
|
|
+ with_items: "{{metrics_hawkular_rc.stdout_lines}}"
|
|
|
+ loop_control:
|
|
|
+ loop_var: object
|
|
|
+
|
|
|
+- shell: >
|
|
|
+ {{openshift.common.client_binary}} --config={{mktemp.stdout}}/admin.kubeconfig
|
|
|
+ get rc
|
|
|
+ -o name
|
|
|
+ -l metrics-infra=hawkular-cassandra
|
|
|
+ -n {{openshift_metrics_project}}
|
|
|
+ register: metrics_cassandra_rc
|
|
|
+ changed_when: "'No resources found' not in metrics_cassandra_rc.stderr"
|
|
|
+
|
|
|
+- name: Stop Hawkular Cassandra
|
|
|
+ include: scale.yaml
|
|
|
+ vars:
|
|
|
+ desired: 0
|
|
|
+ with_items: "{{metrics_cassandra_rc.stdout_lines}}"
|
|
|
+ loop_control:
|
|
|
+ loop_var: object
|
|
|
+ when: metrics_cassandra_rc is defined
|
|
|
+
|