summaryrefslogtreecommitdiffstats
path: root/roles/openshift_metrics/tasks
diff options
context:
space:
mode:
Diffstat (limited to 'roles/openshift_metrics/tasks')
-rw-r--r--roles/openshift_metrics/tasks/install_hawkular.yaml21
-rw-r--r--roles/openshift_metrics/tasks/main.yaml6
2 files changed, 15 insertions, 12 deletions
diff --git a/roles/openshift_metrics/tasks/install_hawkular.yaml b/roles/openshift_metrics/tasks/install_hawkular.yaml
index d7a029fa8..6e503c8c1 100644
--- a/roles/openshift_metrics/tasks/install_hawkular.yaml
+++ b/roles/openshift_metrics/tasks/install_hawkular.yaml
@@ -10,35 +10,38 @@
vars:
node: "{{ item }}"
master: "{{ (item == '1')|string|lower }}"
- with_sequence: count={{ openshift_metrics_hawkular_cassandra_nodes }}
+ with_sequence: count={{ openshift_metrics_cassandra_nodes }}
+
- name: generate hawkular-cassandra persistent volume claims
template:
src: pvc.j2
dest: "{{ mktemp.stdout }}/templates/hawkular-cassandra-pvc{{ item }}.yaml"
vars:
- obj_name: "{{ openshift_metrics_hawkular_cassandra_pv_prefix }}-{{ item }}"
+ obj_name: "{{ openshift_metrics_cassandra_pv_prefix }}-{{ item }}"
labels:
metrics-infra: hawkular-cassandra
access_modes:
- ReadWriteOnce
- size: "{{ openshift_metrics_hawkular_cassandra_pv_size }}"
- with_sequence: count={{ openshift_metrics_hawkular_cassandra_nodes }}
- when: openshift_metrics_hawkular_cassandra_storage_type == 'pv'
+ size: "{{ openshift_metrics_cassandra_pv_size }}"
+ with_sequence: count={{ openshift_metrics_cassandra_nodes }}
+ when: openshift_metrics_cassandra_storage_type == 'pv'
+
- name: generate hawkular-cassandra persistent volume claims (dynamic)
template:
src: pvc.j2
dest: "{{ mktemp.stdout }}/templates/hawkular-cassandra-pvc{{ item }}.yaml"
vars:
- obj_name: "{{ openshift_metrics_hawkular_cassandra_pv_prefix }}-{{ item }}"
+ obj_name: "{{ openshift_metrics_cassandra_pv_prefix }}-{{ item }}"
labels:
metrics-infra: hawkular-cassandra
annotations:
volume.alpha.kubernetes.io/storage-class: dynamic
access_modes:
- ReadWriteOnce
- size: "{{ openshift_metrics_hawkular_cassandra_pv_size }}"
- with_sequence: count={{ openshift_metrics_hawkular_cassandra_nodes }}
- when: openshift_metrics_hawkular_cassandra_storage_type == 'dynamic'
+ size: "{{ openshift_metrics_cassandra_pv_size }}"
+ with_sequence: count={{ openshift_metrics_cassandra_nodes }}
+ when: openshift_metrics_cassandra_storage_type == 'dynamic'
+
- name: read hawkular-metrics route destination ca certificate
slurp: src={{ openshift_metrics_certs_dir }}/ca.crt
register: metrics_route_dest_ca_cert
diff --git a/roles/openshift_metrics/tasks/main.yaml b/roles/openshift_metrics/tasks/main.yaml
index d4bafdc30..74abd120f 100644
--- a/roles/openshift_metrics/tasks/main.yaml
+++ b/roles/openshift_metrics/tasks/main.yaml
@@ -3,12 +3,12 @@
fail: msg='the openshift_metrics_hawkular_metrics_hostname variable is required'
when: openshift_metrics_hawkular_metrics_hostname is not defined
-- name: check the value of openshift_metrics_hawkular_cassandra_storage_type
+- name: check the value of openshift_metrics_cassandra_storage_type
fail:
msg: >
- openshift_metrics_hawkular_cassandra_storage_type ({{ openshift_metrics_hawkular_cassandra_storage_type }})
+ openshift_metrics_cassandra_storage_type ({{ openshift_metrics_cassandra_storage_type }})
is invalid, must be one of: emptydir, pv, dynamic
- when: openshift_metrics_hawkular_cassandra_storage_type not in openshift_metrics_hawkular_cassandra_storage_types
+ when: openshift_metrics_cassandra_storage_type not in openshift_metrics_cassandra_storage_types
- name: Create temp directory for doing work in
command: mktemp -td openshift-metrics-ansible-XXXXXX