diff options
author | ewolinetz <ewolinet@redhat.com> | 2017-03-15 09:16:17 -0500 |
---|---|---|
committer | ewolinetz <ewolinet@redhat.com> | 2017-03-15 09:16:17 -0500 |
commit | 6962f09c1dbb4e963b32667d7106a3c547a35a0f (patch) | |
tree | a76a3086737d620df82d4a1af141fa048c7b3e99 /roles/openshift_metrics | |
parent | 15130f01c9c80b67528d4e76b237822921a0a0c9 (diff) | |
download | openshift-6962f09c1dbb4e963b32667d7106a3c547a35a0f.tar.gz openshift-6962f09c1dbb4e963b32667d7106a3c547a35a0f.tar.bz2 openshift-6962f09c1dbb4e963b32667d7106a3c547a35a0f.tar.xz openshift-6962f09c1dbb4e963b32667d7106a3c547a35a0f.zip |
Cherry picked from #3657
Diffstat (limited to 'roles/openshift_metrics')
-rw-r--r-- | roles/openshift_metrics/defaults/main.yaml | 2 | ||||
-rw-r--r-- | roles/openshift_metrics/tasks/install_cassandra.yaml | 9 |
2 files changed, 6 insertions, 5 deletions
diff --git a/roles/openshift_metrics/defaults/main.yaml b/roles/openshift_metrics/defaults/main.yaml index db4a0e1fc..5921b7bb7 100644 --- a/roles/openshift_metrics/defaults/main.yaml +++ b/roles/openshift_metrics/defaults/main.yaml @@ -47,7 +47,7 @@ openshift_metrics_node_id: nodename openshift_metrics_project: openshift-infra openshift_metrics_cassandra_pvc_prefix: "{{ openshift_hosted_metrics_storage_volume_name | default('metrics-cassandra') }}" -openshift_metrics_cassandra_pvc_access: "{{ openshift_hosted_metrics_storage_access_modes | default('ReadWriteOnce') }}" +openshift_metrics_cassandra_pvc_access: "{{ openshift_hosted_metrics_storage_access_modes | default(['ReadWriteOnce']) }}" openshift_metrics_hawkular_user_write_access: False diff --git a/roles/openshift_metrics/tasks/install_cassandra.yaml b/roles/openshift_metrics/tasks/install_cassandra.yaml index 66c81562b..a467c1a51 100644 --- a/roles/openshift_metrics/tasks/install_cassandra.yaml +++ b/roles/openshift_metrics/tasks/install_cassandra.yaml @@ -22,6 +22,9 @@ with_sequence: count={{ openshift_metrics_cassandra_replicas }} changed_when: false +- set_fact: openshift_metrics_cassandra_pvc_prefix="hawkular-metrics" + when: "not openshift_metrics_cassandra_pvc_prefix or openshift_metrics_cassandra_pvc_prefix == ''" + - name: generate hawkular-cassandra persistent volume claims template: src: pvc.j2 @@ -30,8 +33,7 @@ obj_name: "{{ openshift_metrics_cassandra_pvc_prefix }}-{{ item }}" labels: metrics-infra: hawkular-cassandra - access_modes: - - "{{ openshift_metrics_cassandra_pvc_access }}" + access_modes: "{{ openshift_metrics_cassandra_pvc_access | list }}" size: "{{ openshift_metrics_cassandra_pvc_size }}" with_sequence: count={{ openshift_metrics_cassandra_replicas }} when: @@ -49,8 +51,7 @@ metrics-infra: hawkular-cassandra annotations: volume.alpha.kubernetes.io/storage-class: dynamic - access_modes: - - "{{ openshift_metrics_cassandra_pvc_access }}" + access_modes: "{{ openshift_metrics_cassandra_pvc_access | list }}" size: "{{ openshift_metrics_cassandra_pvc_size }}" with_sequence: count={{ openshift_metrics_cassandra_replicas }} when: openshift_metrics_cassandra_storage_type == 'dynamic' |