diff --git a/deploy/charts/rules/volume/volume-rules.json b/deploy/charts/rules/volume/volume-rules.json index 401beb8..8ab6cff 100644 --- a/deploy/charts/rules/volume/volume-rules.json +++ b/deploy/charts/rules/volume/volume-rules.json @@ -9,7 +9,7 @@ "description": "Persistent Volume Claim '{{ $labels.persistentvolumeclaim }}' has no consumer", "summary": "Persistent Volume Claim '{{ $labels.persistentvolumeclaim }}' in namespace '{{ $labels.namespace }}' is not consumed by any pod in any namespace" }, - "expr": "kube_persistentvolumeclaim_info unless (kube_persistentvolumeclaim_info * on(persistentvolumeclaim) group_left kube_pod_spec_volumes_persistentvolumeclaims_info) == 1", + "expr": "kube_persistentvolumeclaim_info unless (kube_persistentvolumeclaim_info * on(persistentvolumeclaim) group_left (max by (persistentvolumeclaim) (kube_pod_spec_volumes_persistentvolumeclaims_info)))) == 1", "for": "5m", "labels": { "severity": "info"