summaryrefslogtreecommitdiffstats
path: root/roles/openshift_metrics
diff options
context:
space:
mode:
authorScott Dodson <sdodson@redhat.com>2017-03-07 19:45:36 -0500
committerGitHub <noreply@github.com>2017-03-07 19:45:36 -0500
commit766128bf66cbc45cb2c2539dec0472e7d378a3fb (patch)
tree9a86bc79677e0dddbaa285e912512e32efbbb945 /roles/openshift_metrics
parentd3da4d1817d54b9c3aef9fffa6ad166ec950e830 (diff)
parentab88af6414729556cabf4bde7cbb4ea83b183e3f (diff)
downloadopenshift-766128bf66cbc45cb2c2539dec0472e7d378a3fb.tar.gz
openshift-766128bf66cbc45cb2c2539dec0472e7d378a3fb.tar.bz2
openshift-766128bf66cbc45cb2c2539dec0472e7d378a3fb.tar.xz
openshift-766128bf66cbc45cb2c2539dec0472e7d378a3fb.zip
Merge pull request #3558 from ewolinetz/logging_metrics_defaults
Adding some more logging and metrics defaults
Diffstat (limited to 'roles/openshift_metrics')
-rw-r--r--roles/openshift_metrics/defaults/main.yaml7
-rw-r--r--roles/openshift_metrics/tasks/install_cassandra.yaml8
2 files changed, 9 insertions, 6 deletions
diff --git a/roles/openshift_metrics/defaults/main.yaml b/roles/openshift_metrics/defaults/main.yaml
index edaa7d0df..db4a0e1fc 100644
--- a/roles/openshift_metrics/defaults/main.yaml
+++ b/roles/openshift_metrics/defaults/main.yaml
@@ -16,8 +16,8 @@ openshift_metrics_hawkular_ca: ""
openshift_metrics_hawkular_nodeselector: ""
openshift_metrics_cassandra_replicas: 1
-openshift_metrics_cassandra_storage_type: emptydir
-openshift_metrics_cassandra_pvc_size: 10Gi
+openshift_metrics_cassandra_storage_type: "{{ openshift_hosted_metrics_storage_kind | default('emptydir') }}"
+openshift_metrics_cassandra_pvc_size: "{{ openshift_hosted_metrics_storage_volume_size | default('10Gi') }}"
openshift_metrics_cassandra_limits_memory: 2G
openshift_metrics_cassandra_limits_cpu: null
openshift_metrics_cassandra_requests_memory: 1G
@@ -46,7 +46,8 @@ openshift_metrics_master_url: https://kubernetes.default.svc.cluster.local
openshift_metrics_node_id: nodename
openshift_metrics_project: openshift-infra
-openshift_metrics_cassandra_pvc_prefix: metrics-cassandra
+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_hawkular_user_write_access: False
diff --git a/roles/openshift_metrics/tasks/install_cassandra.yaml b/roles/openshift_metrics/tasks/install_cassandra.yaml
index df39c1e1f..66c81562b 100644
--- a/roles/openshift_metrics/tasks/install_cassandra.yaml
+++ b/roles/openshift_metrics/tasks/install_cassandra.yaml
@@ -31,10 +31,12 @@
labels:
metrics-infra: hawkular-cassandra
access_modes:
- - ReadWriteOnce
+ - "{{ openshift_metrics_cassandra_pvc_access }}"
size: "{{ openshift_metrics_cassandra_pvc_size }}"
with_sequence: count={{ openshift_metrics_cassandra_replicas }}
- when: openshift_metrics_cassandra_storage_type == 'pv'
+ when:
+ - openshift_metrics_cassandra_storage_type != 'emptydir'
+ - openshift_metrics_cassandra_storage_type != 'dynamic'
changed_when: false
- name: generate hawkular-cassandra persistent volume claims (dynamic)
@@ -48,7 +50,7 @@
annotations:
volume.alpha.kubernetes.io/storage-class: dynamic
access_modes:
- - ReadWriteOnce
+ - "{{ openshift_metrics_cassandra_pvc_access }}"
size: "{{ openshift_metrics_cassandra_pvc_size }}"
with_sequence: count={{ openshift_metrics_cassandra_replicas }}
when: openshift_metrics_cassandra_storage_type == 'dynamic'