openebs / monitoring

OpenEBS Monitoring add-on. A set of Grafana, Prometheus, and alert manager plugins.
Apache License 2.0
31 stars 20 forks source link

StalePersistentVolumeClaim triggers for any ephemeral PVC #106

Open Quarky9 opened 10 months ago

Quarky9 commented 10 months ago

StalePersistentVolumeClaim triggers for any ephemeral volume most likely due to the fact that ephemeral volumes do not have a matching claimName in the pod but rather the volume template itself.

This also manifests in the fact that "Used by" is empty for any emphemeral volume in eg .kubectl describe pvc

All this leads to kube_pod_spec_volumes_persistentvolumeclaims_info missing which then triggers the alert.

No idea where is the right place to fix this yet tbh.

abhilashshetty04 commented 2 weeks ago

Hi @Quarky9 , This rule was mainly deployed to make sure to notify user on any pvc that is not claimed by Pod. I guess ephemeral volume doesnt create pvc object. Correct me if im wrong.

Quarky9 commented 2 weeks ago

The generic Ephemeral Volumes create PVCs. Difference is they have an ownerReference set which causes them to be deleted once the owner, normally the pod gets deleted.

Recent changes in kubectl though now fill in the UsedBy ( at least since 1.29 ) for kubectl describe pvc calls.

The kube_pod_spec_volumes_persistentvolumeclaims_info is still missing for any ephemeral PVC in 1.29