Skip to content

[k8s] Add PersistentVolume and PersistentVolumeClaim entities and metrics #3375

@jinja2

Description

@jinja2

Area(s)

area:k8s

What's missing?

Semantic conventions for Kubernetes storage resources - PersistentVolumes (pv) and PersistentVolumeClaims (pvc). These are fundamental K8s storage primitives, but we don't have entity or metric definitions for them.

Use cases to cover:

  • Tracking PV/PVC lifecycle phases (Available -> Bound -> Released, etc.)
  • Monitoring storage capacity and requests across clusters
  • Detecting stuck or failed volume provisioning
  • Correlating PV to PVC bindings

Describe the solution you'd like

Entities:

  • k8s.persistentvolume - identified by UID, with name, storageclass, reclaim policy
  • k8s.persistentvolumeclaim - identified by UID, with name, namespace, storageclass

Metrics:

  • k8s.persistentvolume.status.phase - Pending, Available, Bound, Released, Failed
  • k8s.persistentvolume.storage.capacity - capacity in bytes
  • k8s.persistentvolumeclaim.status.phase - Pending, Bound, Lost
  • k8s.persistentvolumeclaim.storage.request - requested storage
  • k8s.persistentvolumeclaim.storage.capacity - provisioned capacity (when bound)

Attributes:

  • k8s.persistentvolume.uid, k8s.persistentvolume.name - identifying/descriptive
  • k8s.persistentvolumeclaim.uid, k8s.persistentvolumeclaim.name - identifying/descriptive
  • k8s.persistentvolume.status.phase - enum (Available, Bound, Failed, Pending, Released)
  • k8s.persistentvolumeclaim.status.phase - enum (Bound, Lost, Pending)
  • k8s.persistentvolume.reclaim_policy - enum (Delete, Recycle, Retain)
  • k8s.persistentvolume.label.<key>, k8s.persistentvolume.annotation.<key> - opt-in
  • k8s.persistentvolumeclaim.label.<key>, k8s.persistentvolumeclaim.annotation.<key> - opt-in

Conditional datapoint attrs on phase metrics:

  • k8s.persistentvolumeclaim.name, k8s.namespace.name on PV phase metric (when Bound)
  • k8s.persistentvolume.name on PVC phase metric (when Bound)

Tip

React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it. Learn more here.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Done

    Status

    Need triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions