Cannot set Prometheus to use StorageClass in OCP3.11

Solution Verified - Updated -

Issue

  • In OCP3.11 Prometheus will be auto deployed into the cluster without any parameters defined in the inventory. However, the default setting is to use ephemeral storage which may cause data loss during the outage.
  • Running this playbook /usr/share/ansible/openshift-ansible/playbooks/openshift-monitoring/config.yml can reconfigure Prometheus, but after runnning it, no PV/PVCs are created and the apps are still running as ephemeral storage mode.
  • The setting of the inventory is:
# Deploy Prometheus
openshift_cluster_monitoring_operator_install=true
openshift_cluster_monitoring_operator_prometheus_storage_enabled=true
openshift_cluster_monitoring_operator_alertmanager_storage_enabled=true
openshift_cluster_monitoring_operator_prometheus_storage_class_name="glusterfs-storage-block"
openshift_cluster_monitoring_operator_prometheus_storage_capacity=50G
openshift_cluster_monitoring_operator_alertmanager_storage_class_name="glusterfs-storage-block"
openshift_cluster_monitoring_operator_alertmanager_storage_capacity=2G

Environment

  • Red Hat OpenShift Container Platform 3.11

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content