Browse Source

Merge pull request #3294 from jcantrill/fix_metrics_pv_vars

use pvc_size instead of pv_size for openshift_metrics since the role …
Jason DeTiberus 8 years ago
parent
commit
fc96d8d22f

+ 2 - 2
roles/openshift_metrics/README.md

@@ -46,11 +46,11 @@ For default values, see [`defaults/main.yaml`](defaults/main.yaml).
   testing), `pv` to use persistent volumes (which need to be created before the
   installation) or `dynamic` for dynamic persistent volumes.
 
-- `openshift_metrics_cassandra_pv_prefix`: The name of persistent volume claims created
+- `openshift_metrics_cassandra_pvc_prefix`: The name of persistent volume claims created
   for cassandra will be this with a serial number appended to the end, starting
   from 1.
 
-- `openshift_metrics_cassandra_pv_size`: The persistent volume size for each of the
+- `openshift_metrics_cassandra_pvc_size`: The persistent volume claim size for each of the
   Cassandra  nodes.
 
 - `openshift_metrics_heapster_standalone`: Deploy only heapster, without the Hawkular Metrics and

+ 2 - 2
roles/openshift_metrics/defaults/main.yaml

@@ -17,7 +17,7 @@ openshift_metrics_hawkular_nodeselector: ""
 
 openshift_metrics_cassandra_replicas: 1
 openshift_metrics_cassandra_storage_type: emptydir
-openshift_metrics_cassandra_pv_size: 10Gi
+openshift_metrics_cassandra_pvc_size: 10Gi
 openshift_metrics_cassandra_limits_memory: 2G
 openshift_metrics_cassandra_limits_cpu: null
 openshift_metrics_cassandra_requests_memory: 1G
@@ -44,7 +44,7 @@ openshift_metrics_master_url: https://kubernetes.default.svc.cluster.local
 openshift_metrics_node_id: nodename
 openshift_metrics_project: openshift-infra
 
-openshift_metrics_cassandra_pv_prefix: metrics-cassandra
+openshift_metrics_cassandra_pvc_prefix: metrics-cassandra
 
 openshift_metrics_hawkular_user_write_access: False
 

+ 4 - 4
roles/openshift_metrics/tasks/install_cassandra.yaml

@@ -27,12 +27,12 @@
     src: pvc.j2
     dest: "{{ mktemp.stdout }}/templates/hawkular-cassandra-pvc{{ item }}.yaml"
   vars:
-    obj_name: "{{ openshift_metrics_cassandra_pv_prefix }}-{{ item }}"
+    obj_name: "{{ openshift_metrics_cassandra_pvc_prefix }}-{{ item }}"
     labels:
       metrics-infra: hawkular-cassandra
     access_modes:
     - ReadWriteOnce
-    size: "{{ openshift_metrics_cassandra_pv_size }}"
+    size: "{{ openshift_metrics_cassandra_pvc_size }}"
   with_sequence: count={{ openshift_metrics_cassandra_replicas }}
   when: openshift_metrics_cassandra_storage_type == 'pv'
   changed_when: false
@@ -42,14 +42,14 @@
     src: pvc.j2
     dest: "{{ mktemp.stdout }}/templates/hawkular-cassandra-pvc{{ item }}.yaml"
   vars:
-    obj_name: "{{ openshift_metrics_cassandra_pv_prefix }}-{{ item }}"
+    obj_name: "{{ openshift_metrics_cassandra_pvc_prefix }}-{{ item }}"
     labels:
       metrics-infra: hawkular-cassandra
     annotations:
       volume.alpha.kubernetes.io/storage-class: dynamic
     access_modes:
     - ReadWriteOnce
-    size: "{{ openshift_metrics_cassandra_pv_size }}"
+    size: "{{ openshift_metrics_cassandra_pvc_size }}"
   with_sequence: count={{ openshift_metrics_cassandra_replicas }}
   when: openshift_metrics_cassandra_storage_type == 'dynamic'
   changed_when: false

+ 1 - 1
roles/openshift_metrics/templates/hawkular_cassandra_rc.j2

@@ -124,7 +124,7 @@ spec:
         emptyDir: {}
 {%      else %}
         persistentVolumeClaim:
-          claimName: "{{ openshift_metrics_cassandra_pv_prefix }}-{{ node }}"
+          claimName: "{{ openshift_metrics_cassandra_pvc_prefix }}-{{ node }}"
 {% endif %}
       - name: hawkular-cassandra-secrets
         secret: