فهرست منبع

cluster-monitoring: Adds storageclass name variable

Davi Garcia 6 سال پیش
والد
کامیت
492190386b

+ 2 - 0
roles/openshift_cluster_monitoring_operator/defaults/main.yml

@@ -45,7 +45,9 @@ openshift_cluster_monitoring_operator_proxy_image: "{{l_openshift_cluster_monito
 
 openshift_cluster_monitoring_operator_prometheus_storage_enabled: false
 openshift_cluster_monitoring_operator_prometheus_storage_capacity: "50Gi"
+openshift_cluster_monitoring_operator_prometheus_storage_class_name: ""
 openshift_cluster_monitoring_operator_alertmanager_storage_enabled: false
+openshift_cluster_monitoring_operator_alertmanager_storage_class_name: ""
 openshift_cluster_monitoring_operator_alertmanager_storage_capacity: "2Gi"
 
 openshift_cluster_monitoring_operator_cluster_id: "{{ openshift_clusterid | default(openshift_master_cluster_public_hostname, true) | default(openshift_master_cluster_hostname, true) | default('openshift', true) }}"

+ 6 - 0
roles/openshift_cluster_monitoring_operator/templates/cluster-monitoring-operator-config.j2

@@ -28,6 +28,9 @@ data:
 {% if openshift_cluster_monitoring_operator_prometheus_storage_enabled | bool %}
       volumeClaimTemplate:
         spec:
+{% if openshift_cluster_monitoring_operator_prometheus_storage_class_name %}
+          storageClassName: {{ openshift_cluster_monitoring_operator_prometheus_storage_class_name }}
+{% endif %}
           resources:
             requests:
               storage: {{ openshift_cluster_monitoring_operator_prometheus_storage_capacity }}
@@ -43,6 +46,9 @@ data:
 {% if openshift_cluster_monitoring_operator_alertmanager_storage_enabled | bool %}
       volumeClaimTemplate:
         spec:
+{% if openshift_cluster_monitoring_operator_alertmanager_storage_class_name %}
+          storageClassName: {{ openshift_cluster_monitoring_operator_alertmanager_storage_class_name }}
+{% endif %}
           resources:
             requests:
               storage: {{ openshift_cluster_monitoring_operator_alertmanager_storage_capacity }}