|
@@ -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
|