There is a new metric in kubernetes 1.20: pv_collector_total_pv_count added via https://github.com/kubernetes/kubernetes/pull/95719. The plugin_name and volume_mode should be collected via telemetry in order to provide overview of the cluster storage usage.
Verified pass on 4.7.0-0.nightly-2020-12-20-031835 $ oc -n openshift-monitoring exec -c prometheus prometheus-k8s-0 -- curl -k -H "Authorization: Bearer $token" 'https://prometheus-k8s.openshift-monitoring.svc:9091/api/v1/query?query=vsphere_cluster_check_total' | jq { "status": "success", "data": { "resultType": "vector", "result": [ { "metric": { "__name__": "cluster:kube_persistentvolume_plugin_type_counts:sum", "plugin_name": "kubernetes.io/cinder", "volume_mode": "Block" }, "value": [ 1608532399.396, "1" ] }, { "metric": { "__name__": "cluster:kube_persistentvolume_plugin_type_counts:sum", "plugin_name": "kubernetes.io/cinder", "volume_mode": "Filesystem" }, "value": [ 1608532399.396, "2" ] }, { "metric": {oc -n openshift-monitoring exec -c prometheus prometheus-k8s-0 -- curl -k -H "Authorization: Bearer $token" 'https://prometheus-k8s.openshift-monitoring.svc:9091/api/v1/query?query=vsphere_cluster_check_total' | jq { "status": "success", "data": { "resultType": "vector", "result": [ { "metric": { "__name__": "cluster:kube_persistentvolume_plugin_type_counts:sum", "plugin_name": "kubernetes.io/cinder", "volume_mode": "Block" }, "value": [ 1608532399.396, "1" ] "__name__": "cluster:kube_persistentvolume_plugin_type_counts:sum", "plugin_name": "kubernetes.io/csi:cinder.csi.openstack.org", "volume_mode": "Block" }, "value": [ 1608532399.396, "2" ] }, { "metric": { "__name__": "cluster:kube_persistentvolume_plugin_type_counts:sum", "plugin_name": "kubernetes.io/csi:cinder.csi.openstack.org", "volume_mode": "Filesystem" }, "value": [ 1608532399.396, "2" ] } ] } }
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Moderate: OpenShift Container Platform 4.7.0 security, bug fix, and enhancement update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2020:5633