feat: Add PersistentVolume Reclaim Policy metric
In order to monitor for PVs with different reclaim policies add a `reclaim_policy` label to the `kube_persistentvolume_info` metric. Signed-off-by: SuperQ <superq@gmail.com>
This commit is contained in:
parent
3527ceb4d5
commit
a775fe3458
|
|
@ -7,7 +7,7 @@
|
|||
| kube_persistentvolume_status_phase | Gauge | | | `persistentvolume`=<pv-name> <br>`phase`=<Bound\|Failed\|Pending\|Available\|Released> | STABLE |
|
||||
| kube_persistentvolume_claim_ref | Gauge | | | `persistentvolume`=<pv-name> <br>`claim_namespace`=<<namespace>> <br>`name`=<<name>> | STABLE |
|
||||
| kube_persistentvolume_labels | Gauge | Kubernetes labels converted to Prometheus labels controlled via [--metric-labels-allowlist](../../developer/cli-arguments.md) | | `persistentvolume`=<persistentvolume-name> <br> `label_PERSISTENTVOLUME_LABEL`=<PERSISTENTVOLUME_LABEL> | STABLE |
|
||||
| kube_persistentvolume_info | Gauge | Information about Persistent Volumes | | `persistentvolume`=<pv-name> <br> `storageclass`=<storageclass-name> <br> `gce_persistent_disk_name`=<pd-name> <br> `host_path`=<path-of-a-host-volume> <br> `host_path_type`=<host-mount-type> <br> `ebs_volume_id`=<ebs-volume-id> <br> `azure_disk_name`=<azure-disk-name> <br> `fc_wwids`=<fc-wwids-comma-separated> <br> `fc_lun`=<fc-lun> <br> `fc_target_wwns`=<fc-target-wwns-comma-separated> <br> `iscsi_target_portal`=<iscsi-target-portal> <br> `iscsi_iqn`=<iscsi-iqn> <br> `iscsi_lun`=<iscsi-lun> <br> `iscsi_initiator_name`=<iscsi-initiator-name> <br> `local_path`=<path-of-a-local-volume> <br> `local_fs`=<local-volume-fs-type> <br> `nfs_server`=<nfs-server> <br> `nfs_path`=<nfs-path> <br> `csi_driver`=<csi-driver> <br> `csi_volume_handle`=<csi-volume-handle> | STABLE |
|
||||
| kube_persistentvolume_info | Gauge | Information about Persistent Volumes | | `persistentvolume`=<pv-name> <br> `storageclass`=<storageclass-name> <br> `gce_persistent_disk_name`=<pd-name> <br> `host_path`=<path-of-a-host-volume> <br> `host_path_type`=<host-mount-type> <br> `ebs_volume_id`=<ebs-volume-id> <br> `azure_disk_name`=<azure-disk-name> <br> `fc_wwids`=<fc-wwids-comma-separated> <br> `fc_lun`=<fc-lun> <br> `fc_target_wwns`=<fc-target-wwns-comma-separated> <br> `iscsi_target_portal`=<iscsi-target-portal> <br> `iscsi_iqn`=<iscsi-iqn> <br> `iscsi_lun`=<iscsi-lun> <br> `iscsi_initiator_name`=<iscsi-initiator-name> <br> `local_path`=<path-of-a-local-volume> <br> `local_fs`=<local-volume-fs-type> <br> `nfs_server`=<nfs-server> <br> `nfs_path`=<nfs-path> <br> `csi_driver`=<csi-driver> <br> `csi_volume_handle`=<csi-volume-handle> <br> `reclaim_policy`=<reclaim-policy> | STABLE |
|
||||
| kube_persistentvolume_created | Gauge | Unix creation timestamp | seconds | `persistentvolume`=<persistentvolume-name> <br> | EXPERIMENTAL |
|
||||
| kube_persistentvolume_deletion_timestamp | Gauge | Unix deletion timestamp | seconds | `persistentvolume`=<persistentvolume-name> <br> | EXPERIMENTAL |
|
||||
| kube_persistentvolume_csi_attributes | Gauge | CSI attributes of the Persistent Volume, disabled by default, manage with [--metric-opt-in-list](../../developer/cli-arguments.md)) | | `persistentvolume`=<persistentvolume-name> <br> `csi_mounter`=<csi-mounter> <br> `csi_map_options`=<csi-map-options> | EXPERIMENTAL |
|
||||
|
|
|
|||
|
|
@ -313,6 +313,7 @@ func createPersistentVolumeInfo() generator.FamilyGenerator {
|
|||
"local_fs",
|
||||
"host_path",
|
||||
"host_path_type",
|
||||
"reclaim_policy",
|
||||
},
|
||||
LabelValues: []string{
|
||||
p.Spec.StorageClassName,
|
||||
|
|
@ -334,6 +335,7 @@ func createPersistentVolumeInfo() generator.FamilyGenerator {
|
|||
localFS,
|
||||
hostPath,
|
||||
hostPathType,
|
||||
string(p.Spec.PersistentVolumeReclaimPolicy),
|
||||
},
|
||||
Value: 1,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ import (
|
|||
func TestPersistentVolumeStore(t *testing.T) {
|
||||
iscsiInitiatorName := "iqn.my.test.initiator:112233"
|
||||
volumeMode := v1.PersistentVolumeBlock
|
||||
var reclaimPolicy v1.PersistentVolumeReclaimPolicy = "Retain"
|
||||
cases := []generateMetricsTestCase{
|
||||
// Verify phase enumerations.
|
||||
{
|
||||
|
|
@ -166,6 +167,9 @@ func TestPersistentVolumeStore(t *testing.T) {
|
|||
ObjectMeta: metav1.ObjectMeta{
|
||||
Name: "test-pv-available",
|
||||
},
|
||||
Spec: v1.PersistentVolumeSpec{
|
||||
PersistentVolumeReclaimPolicy: reclaimPolicy,
|
||||
},
|
||||
Status: v1.PersistentVolumeStatus{
|
||||
Phase: v1.VolumeAvailable,
|
||||
},
|
||||
|
|
@ -173,7 +177,7 @@ func TestPersistentVolumeStore(t *testing.T) {
|
|||
Want: `
|
||||
# HELP kube_persistentvolume_info [STABLE] Information about persistentvolume.
|
||||
# TYPE kube_persistentvolume_info gauge
|
||||
kube_persistentvolume_info{azure_disk_name="",ebs_volume_id="",fc_lun="",fc_target_wwns="",fc_wwids="",gce_persistent_disk_name="",host_path="",host_path_type="",iscsi_initiator_name="",iscsi_iqn="",iscsi_lun="",iscsi_target_portal="",local_path="",local_fs="",nfs_path="",nfs_server="",csi_driver="",csi_volume_handle="",persistentvolume="test-pv-available",storageclass=""} 1
|
||||
kube_persistentvolume_info{azure_disk_name="",ebs_volume_id="",fc_lun="",fc_target_wwns="",fc_wwids="",gce_persistent_disk_name="",host_path="",host_path_type="",iscsi_initiator_name="",iscsi_iqn="",iscsi_lun="",iscsi_target_portal="",local_path="",local_fs="",nfs_path="",nfs_server="",csi_driver="",csi_volume_handle="",persistentvolume="test-pv-available",reclaim_policy="Retain",storageclass=""} 1
|
||||
`,
|
||||
MetricNames: []string{"kube_persistentvolume_info"},
|
||||
},
|
||||
|
|
@ -192,7 +196,7 @@ func TestPersistentVolumeStore(t *testing.T) {
|
|||
Want: `
|
||||
# HELP kube_persistentvolume_info [STABLE] Information about persistentvolume.
|
||||
# TYPE kube_persistentvolume_info gauge
|
||||
kube_persistentvolume_info{azure_disk_name="",ebs_volume_id="",fc_lun="",fc_target_wwns="",fc_wwids="",gce_persistent_disk_name="",host_path="",host_path_type="",iscsi_initiator_name="",iscsi_iqn="",iscsi_lun="",iscsi_target_portal="",local_path="",local_fs="",nfs_path="",nfs_server="",csi_driver="",csi_volume_handle="",persistentvolume="test-pv-available",storageclass=""} 1
|
||||
kube_persistentvolume_info{azure_disk_name="",ebs_volume_id="",fc_lun="",fc_target_wwns="",fc_wwids="",gce_persistent_disk_name="",host_path="",host_path_type="",iscsi_initiator_name="",iscsi_iqn="",iscsi_lun="",iscsi_target_portal="",local_path="",local_fs="",nfs_path="",nfs_server="",csi_driver="",csi_volume_handle="",persistentvolume="test-pv-available",reclaim_policy="",storageclass=""} 1
|
||||
`,
|
||||
MetricNames: []string{"kube_persistentvolume_info"},
|
||||
},
|
||||
|
|
@ -215,7 +219,7 @@ func TestPersistentVolumeStore(t *testing.T) {
|
|||
Want: `
|
||||
# HELP kube_persistentvolume_info [STABLE] Information about persistentvolume.
|
||||
# TYPE kube_persistentvolume_info gauge
|
||||
kube_persistentvolume_info{azure_disk_name="",ebs_volume_id="",fc_lun="",fc_target_wwns="",fc_wwids="",gce_persistent_disk_name="name",host_path="",host_path_type="",iscsi_initiator_name="",iscsi_iqn="",iscsi_lun="",iscsi_target_portal="",local_path="",local_fs="",nfs_path="",nfs_server="",csi_driver="",csi_volume_handle="",persistentvolume="test-pv-available",storageclass=""} 1
|
||||
kube_persistentvolume_info{azure_disk_name="",ebs_volume_id="",fc_lun="",fc_target_wwns="",fc_wwids="",gce_persistent_disk_name="name",host_path="",host_path_type="",iscsi_initiator_name="",iscsi_iqn="",iscsi_lun="",iscsi_target_portal="",local_path="",local_fs="",nfs_path="",nfs_server="",csi_driver="",csi_volume_handle="",persistentvolume="test-pv-available",reclaim_policy="",storageclass=""} 1
|
||||
`,
|
||||
MetricNames: []string{"kube_persistentvolume_info"},
|
||||
},
|
||||
|
|
@ -238,7 +242,7 @@ func TestPersistentVolumeStore(t *testing.T) {
|
|||
Want: `
|
||||
# HELP kube_persistentvolume_info [STABLE] Information about persistentvolume.
|
||||
# TYPE kube_persistentvolume_info gauge
|
||||
kube_persistentvolume_info{azure_disk_name="",ebs_volume_id="aws://eu-west-1c/vol-012d34d567890123b",fc_lun="",fc_target_wwns="",fc_wwids="",gce_persistent_disk_name="",host_path="",host_path_type="",iscsi_initiator_name="",iscsi_iqn="",iscsi_lun="",iscsi_target_portal="",local_path="",local_fs="",nfs_path="",nfs_server="",csi_driver="",csi_volume_handle="",persistentvolume="test-pv-available",storageclass=""} 1
|
||||
kube_persistentvolume_info{azure_disk_name="",ebs_volume_id="aws://eu-west-1c/vol-012d34d567890123b",fc_lun="",fc_target_wwns="",fc_wwids="",gce_persistent_disk_name="",host_path="",host_path_type="",iscsi_initiator_name="",iscsi_iqn="",iscsi_lun="",iscsi_target_portal="",local_path="",local_fs="",nfs_path="",nfs_server="",csi_driver="",csi_volume_handle="",persistentvolume="test-pv-available",reclaim_policy="",storageclass=""} 1
|
||||
`,
|
||||
MetricNames: []string{"kube_persistentvolume_info"},
|
||||
},
|
||||
|
|
@ -261,7 +265,7 @@ func TestPersistentVolumeStore(t *testing.T) {
|
|||
Want: `
|
||||
# HELP kube_persistentvolume_info [STABLE] Information about persistentvolume.
|
||||
# TYPE kube_persistentvolume_info gauge
|
||||
kube_persistentvolume_info{azure_disk_name="azure_disk_1",ebs_volume_id="",fc_lun="",fc_target_wwns="",fc_wwids="",gce_persistent_disk_name="",host_path="",host_path_type="",iscsi_initiator_name="",iscsi_iqn="",iscsi_lun="",iscsi_target_portal="",local_path="",local_fs="",nfs_path="",nfs_server="",csi_driver="",csi_volume_handle="",persistentvolume="test-pv-available",storageclass=""} 1
|
||||
kube_persistentvolume_info{azure_disk_name="azure_disk_1",ebs_volume_id="",fc_lun="",fc_target_wwns="",fc_wwids="",gce_persistent_disk_name="",host_path="",host_path_type="",iscsi_initiator_name="",iscsi_iqn="",iscsi_lun="",iscsi_target_portal="",local_path="",local_fs="",nfs_path="",nfs_server="",csi_driver="",csi_volume_handle="",persistentvolume="test-pv-available",reclaim_policy="",storageclass=""} 1
|
||||
`,
|
||||
MetricNames: []string{"kube_persistentvolume_info"},
|
||||
},
|
||||
|
|
@ -285,7 +289,7 @@ func TestPersistentVolumeStore(t *testing.T) {
|
|||
Want: `
|
||||
# HELP kube_persistentvolume_info [STABLE] Information about persistentvolume.
|
||||
# TYPE kube_persistentvolume_info gauge
|
||||
kube_persistentvolume_info{azure_disk_name="",ebs_volume_id="",fc_lun="123",fc_target_wwns="0123456789abcdef,abcdef0123456789",fc_wwids="",gce_persistent_disk_name="",host_path="",host_path_type="",iscsi_initiator_name="",iscsi_iqn="",iscsi_lun="",iscsi_target_portal="",local_path="",local_fs="",nfs_path="",nfs_server="",csi_driver="",csi_volume_handle="",persistentvolume="test-pv-available",storageclass=""} 1
|
||||
kube_persistentvolume_info{azure_disk_name="",ebs_volume_id="",fc_lun="123",fc_target_wwns="0123456789abcdef,abcdef0123456789",fc_wwids="",gce_persistent_disk_name="",host_path="",host_path_type="",iscsi_initiator_name="",iscsi_iqn="",iscsi_lun="",iscsi_target_portal="",local_path="",local_fs="",nfs_path="",nfs_server="",csi_driver="",csi_volume_handle="",persistentvolume="test-pv-available",reclaim_policy="",storageclass=""} 1
|
||||
`,
|
||||
MetricNames: []string{"kube_persistentvolume_info"},
|
||||
},
|
||||
|
|
@ -308,7 +312,7 @@ func TestPersistentVolumeStore(t *testing.T) {
|
|||
Want: `
|
||||
# HELP kube_persistentvolume_info [STABLE] Information about persistentvolume.
|
||||
# TYPE kube_persistentvolume_info gauge
|
||||
kube_persistentvolume_info{azure_disk_name="",ebs_volume_id="",fc_lun="",fc_target_wwns="",fc_wwids="0123456789abcdef,abcdef0123456789",gce_persistent_disk_name="",host_path="",host_path_type="",iscsi_initiator_name="",iscsi_iqn="",iscsi_lun="",iscsi_target_portal="",local_path="",local_fs="",nfs_path="",nfs_server="",csi_driver="",csi_volume_handle="",persistentvolume="test-pv-available",storageclass=""} 1
|
||||
kube_persistentvolume_info{azure_disk_name="",ebs_volume_id="",fc_lun="",fc_target_wwns="",fc_wwids="0123456789abcdef,abcdef0123456789",gce_persistent_disk_name="",host_path="",host_path_type="",iscsi_initiator_name="",iscsi_iqn="",iscsi_lun="",iscsi_target_portal="",local_path="",local_fs="",nfs_path="",nfs_server="",csi_driver="",csi_volume_handle="",persistentvolume="test-pv-available",reclaim_policy="",storageclass=""} 1
|
||||
`,
|
||||
MetricNames: []string{"kube_persistentvolume_info"},
|
||||
},
|
||||
|
|
@ -333,7 +337,7 @@ func TestPersistentVolumeStore(t *testing.T) {
|
|||
Want: `
|
||||
# HELP kube_persistentvolume_info [STABLE] Information about persistentvolume.
|
||||
# TYPE kube_persistentvolume_info gauge
|
||||
kube_persistentvolume_info{azure_disk_name="",ebs_volume_id="",fc_lun="",fc_target_wwns="",fc_wwids="",gce_persistent_disk_name="",host_path="",host_path_type="",iscsi_initiator_name="",iscsi_iqn="iqn.my.test.server.target00",iscsi_lun="123",iscsi_target_portal="1.2.3.4:3260",local_path="",local_fs="",nfs_path="",nfs_server="",csi_driver="",csi_volume_handle="",persistentvolume="test-pv-available",storageclass=""} 1
|
||||
kube_persistentvolume_info{azure_disk_name="",ebs_volume_id="",fc_lun="",fc_target_wwns="",fc_wwids="",gce_persistent_disk_name="",host_path="",host_path_type="",iscsi_initiator_name="",iscsi_iqn="iqn.my.test.server.target00",iscsi_lun="123",iscsi_target_portal="1.2.3.4:3260",local_path="",local_fs="",nfs_path="",nfs_server="",csi_driver="",csi_volume_handle="",persistentvolume="test-pv-available",reclaim_policy="",storageclass=""} 1
|
||||
`,
|
||||
MetricNames: []string{"kube_persistentvolume_info"},
|
||||
},
|
||||
|
|
@ -359,7 +363,7 @@ func TestPersistentVolumeStore(t *testing.T) {
|
|||
Want: `
|
||||
# HELP kube_persistentvolume_info [STABLE] Information about persistentvolume.
|
||||
# TYPE kube_persistentvolume_info gauge
|
||||
kube_persistentvolume_info{azure_disk_name="",ebs_volume_id="",fc_lun="",fc_target_wwns="",fc_wwids="",gce_persistent_disk_name="",host_path="",host_path_type="",iscsi_initiator_name="iqn.my.test.initiator:112233",iscsi_iqn="iqn.my.test.server.target00",iscsi_lun="123",iscsi_target_portal="1.2.3.4:3260",local_path="",local_fs="",nfs_path="",nfs_server="",csi_driver="",csi_volume_handle="",persistentvolume="test-pv-available",storageclass=""} 1
|
||||
kube_persistentvolume_info{azure_disk_name="",ebs_volume_id="",fc_lun="",fc_target_wwns="",fc_wwids="",gce_persistent_disk_name="",host_path="",host_path_type="",iscsi_initiator_name="iqn.my.test.initiator:112233",iscsi_iqn="iqn.my.test.server.target00",iscsi_lun="123",iscsi_target_portal="1.2.3.4:3260",local_path="",local_fs="",nfs_path="",nfs_server="",csi_driver="",csi_volume_handle="",persistentvolume="test-pv-available",reclaim_policy="",storageclass=""} 1
|
||||
`,
|
||||
MetricNames: []string{"kube_persistentvolume_info"},
|
||||
},
|
||||
|
|
@ -383,7 +387,7 @@ func TestPersistentVolumeStore(t *testing.T) {
|
|||
Want: `
|
||||
# HELP kube_persistentvolume_info [STABLE] Information about persistentvolume.
|
||||
# TYPE kube_persistentvolume_info gauge
|
||||
kube_persistentvolume_info{azure_disk_name="",ebs_volume_id="",fc_lun="",fc_target_wwns="",fc_wwids="",gce_persistent_disk_name="",host_path="",host_path_type="",iscsi_initiator_name="",iscsi_iqn="",iscsi_lun="",iscsi_target_portal="",local_path="",local_fs="",nfs_path="/myPath",nfs_server="1.2.3.4",csi_driver="",csi_volume_handle="",persistentvolume="test-pv-available",storageclass=""} 1
|
||||
kube_persistentvolume_info{azure_disk_name="",ebs_volume_id="",fc_lun="",fc_target_wwns="",fc_wwids="",gce_persistent_disk_name="",host_path="",host_path_type="",iscsi_initiator_name="",iscsi_iqn="",iscsi_lun="",iscsi_target_portal="",local_path="",local_fs="",nfs_path="/myPath",nfs_server="1.2.3.4",csi_driver="",csi_volume_handle="",persistentvolume="test-pv-available",reclaim_policy="",storageclass=""} 1
|
||||
`,
|
||||
MetricNames: []string{"kube_persistentvolume_info"},
|
||||
},
|
||||
|
|
@ -407,7 +411,7 @@ func TestPersistentVolumeStore(t *testing.T) {
|
|||
Want: `
|
||||
# HELP kube_persistentvolume_info [STABLE] Information about persistentvolume.
|
||||
# TYPE kube_persistentvolume_info gauge
|
||||
kube_persistentvolume_info{azure_disk_name="",ebs_volume_id="",fc_lun="",fc_target_wwns="",fc_wwids="",gce_persistent_disk_name="",host_path="",host_path_type="",iscsi_initiator_name="",iscsi_iqn="",iscsi_lun="",iscsi_target_portal="",local_path="",local_fs="",nfs_path="",nfs_server="",csi_driver="test-driver",csi_volume_handle="test-volume-handle",persistentvolume="test-pv-available",storageclass=""} 1
|
||||
kube_persistentvolume_info{azure_disk_name="",ebs_volume_id="",fc_lun="",fc_target_wwns="",fc_wwids="",gce_persistent_disk_name="",host_path="",host_path_type="",iscsi_initiator_name="",iscsi_iqn="",iscsi_lun="",iscsi_target_portal="",local_path="",local_fs="",nfs_path="",nfs_server="",csi_driver="test-driver",csi_volume_handle="test-volume-handle",persistentvolume="test-pv-available",reclaim_policy="",storageclass=""} 1
|
||||
`,
|
||||
MetricNames: []string{"kube_persistentvolume_info"},
|
||||
},
|
||||
|
|
@ -431,7 +435,7 @@ func TestPersistentVolumeStore(t *testing.T) {
|
|||
Want: `
|
||||
# HELP kube_persistentvolume_info [STABLE] Information about persistentvolume.
|
||||
# TYPE kube_persistentvolume_info gauge
|
||||
kube_persistentvolume_info{azure_disk_name="",ebs_volume_id="",fc_lun="",fc_target_wwns="",fc_wwids="",gce_persistent_disk_name="",host_path="",host_path_type="",iscsi_initiator_name="",iscsi_iqn="",iscsi_lun="",iscsi_target_portal="",local_path="/mnt/data",local_fs="ext4",nfs_path="",nfs_server="",csi_driver="",csi_volume_handle="",persistentvolume="test-pv-available",storageclass=""} 1
|
||||
kube_persistentvolume_info{azure_disk_name="",ebs_volume_id="",fc_lun="",fc_target_wwns="",fc_wwids="",gce_persistent_disk_name="",host_path="",host_path_type="",iscsi_initiator_name="",iscsi_iqn="",iscsi_lun="",iscsi_target_portal="",local_path="/mnt/data",local_fs="ext4",nfs_path="",nfs_server="",csi_driver="",csi_volume_handle="",persistentvolume="test-pv-available",reclaim_policy="",storageclass=""} 1
|
||||
`,
|
||||
MetricNames: []string{"kube_persistentvolume_info"},
|
||||
},
|
||||
|
|
@ -454,7 +458,7 @@ func TestPersistentVolumeStore(t *testing.T) {
|
|||
Want: `
|
||||
# HELP kube_persistentvolume_info [STABLE] Information about persistentvolume.
|
||||
# TYPE kube_persistentvolume_info gauge
|
||||
kube_persistentvolume_info{azure_disk_name="",ebs_volume_id="",fc_lun="",fc_target_wwns="",fc_wwids="",gce_persistent_disk_name="",host_path="",host_path_type="",iscsi_initiator_name="",iscsi_iqn="",iscsi_lun="",iscsi_target_portal="",local_path="/mnt/data",local_fs="",nfs_path="",nfs_server="",csi_driver="",csi_volume_handle="",persistentvolume="test-pv-available",storageclass=""} 1
|
||||
kube_persistentvolume_info{azure_disk_name="",ebs_volume_id="",fc_lun="",fc_target_wwns="",fc_wwids="",gce_persistent_disk_name="",host_path="",host_path_type="",iscsi_initiator_name="",iscsi_iqn="",iscsi_lun="",iscsi_target_portal="",local_path="/mnt/data",local_fs="",nfs_path="",nfs_server="",csi_driver="",csi_volume_handle="",persistentvolume="test-pv-available",reclaim_policy="",storageclass=""} 1
|
||||
`,
|
||||
MetricNames: []string{"kube_persistentvolume_info"},
|
||||
},
|
||||
|
|
@ -478,7 +482,7 @@ func TestPersistentVolumeStore(t *testing.T) {
|
|||
Want: `
|
||||
# HELP kube_persistentvolume_info [STABLE] Information about persistentvolume.
|
||||
# TYPE kube_persistentvolume_info gauge
|
||||
kube_persistentvolume_info{azure_disk_name="",ebs_volume_id="",fc_lun="",fc_target_wwns="",fc_wwids="",gce_persistent_disk_name="",host_path="/mnt/data",host_path_type="Directory",iscsi_initiator_name="",iscsi_iqn="",iscsi_lun="",iscsi_target_portal="",local_path="",local_fs="",nfs_path="",nfs_server="",csi_driver="",csi_volume_handle="",persistentvolume="test-pv-available",storageclass=""} 1
|
||||
kube_persistentvolume_info{azure_disk_name="",ebs_volume_id="",fc_lun="",fc_target_wwns="",fc_wwids="",gce_persistent_disk_name="",host_path="/mnt/data",host_path_type="Directory",iscsi_initiator_name="",iscsi_iqn="",iscsi_lun="",iscsi_target_portal="",local_path="",local_fs="",nfs_path="",nfs_server="",csi_driver="",csi_volume_handle="",persistentvolume="test-pv-available",reclaim_policy="",storageclass=""} 1
|
||||
`,
|
||||
MetricNames: []string{"kube_persistentvolume_info"},
|
||||
},
|
||||
|
|
@ -501,7 +505,7 @@ func TestPersistentVolumeStore(t *testing.T) {
|
|||
Want: `
|
||||
# HELP kube_persistentvolume_info [STABLE] Information about persistentvolume.
|
||||
# TYPE kube_persistentvolume_info gauge
|
||||
kube_persistentvolume_info{azure_disk_name="",ebs_volume_id="",fc_lun="",fc_target_wwns="",fc_wwids="",gce_persistent_disk_name="",host_path="/mnt/data",host_path_type="",iscsi_initiator_name="",iscsi_iqn="",iscsi_lun="",iscsi_target_portal="",local_path="",local_fs="",nfs_path="",nfs_server="",csi_driver="",csi_volume_handle="",persistentvolume="test-pv-available",storageclass=""} 1
|
||||
kube_persistentvolume_info{azure_disk_name="",ebs_volume_id="",fc_lun="",fc_target_wwns="",fc_wwids="",gce_persistent_disk_name="",host_path="/mnt/data",host_path_type="",iscsi_initiator_name="",iscsi_iqn="",iscsi_lun="",iscsi_target_portal="",local_path="",local_fs="",nfs_path="",nfs_server="",csi_driver="",csi_volume_handle="",persistentvolume="test-pv-available",reclaim_policy="",storageclass=""} 1
|
||||
`,
|
||||
MetricNames: []string{"kube_persistentvolume_info"},
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue