From d8183327980378fdde7c245650f94bd932a7b446 Mon Sep 17 00:00:00 2001 From: Benji Banwart <70287143+BenjaminBanwart@users.noreply.github.com> Date: Tue, 20 May 2025 11:48:45 -0500 Subject: [PATCH 1/3] fix/ add namespace to PVC rules to avoid many-to-many joins Signed-off-by: Benji Banwart <70287143+BenjaminBanwart@users.noreply.github.com> fix/ update expression in jsonnet dir Signed-off-by: Benji Banwart <70287143+BenjaminBanwart@users.noreply.github.com> fix/ implement count by() on the right side of the expression The count by() returns one series per claim. This makes the join key unique on both sides. Signed-off-by: Benji Banwart <70287143+BenjaminBanwart@users.noreply.github.com> fix/ simplify and fix the expression here introduce count by() to allow for unique join keys Signed-off-by: Benji Banwart <70287143+BenjaminBanwart@users.noreply.github.com> fix: add namespace to PVC joins Avoid many-to-many errors when the same PVC name exists in multiple namespaces by joining on namespace. Signed-off-by: Abhilash Shetty --- deploy/charts/rules/volume/volume-rules.json | 2 +- jsonnet/openebs-mixin/rules/volume/volume-rules.libsonnet | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/deploy/charts/rules/volume/volume-rules.json b/deploy/charts/rules/volume/volume-rules.json index 8ab6cff..f0ac99e 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 (max by (persistentvolumeclaim) (kube_pod_spec_volumes_persistentvolumeclaims_info)))) == 1", + "expr": "kube_persistentvolumeclaim_info UNLESS ON (namespace, persistentvolumeclaim) count by (namespace, persistentvolumeclaim) (kube_pod_spec_volumes_persistentvolumeclaims_info) == 1", "for": "5m", "labels": { "severity": "info" diff --git a/jsonnet/openebs-mixin/rules/volume/volume-rules.libsonnet b/jsonnet/openebs-mixin/rules/volume/volume-rules.libsonnet index 5d91913..f3ee8bf 100644 --- a/jsonnet/openebs-mixin/rules/volume/volume-rules.libsonnet +++ b/jsonnet/openebs-mixin/rules/volume/volume-rules.libsonnet @@ -14,7 +14,7 @@ function(param) { summary: "Persistent Volume Claim '{{ $labels.persistentvolumeclaim }}' in namespace '{{ $labels.namespace }}' is not consumed by any pod in any namespace", description: "Persistent Volume Claim '{{ $labels.persistentvolumeclaim }}' has no consumer", }, - expr: 'kube_persistentvolumeclaim_info unless (kube_persistentvolumeclaim_info * on(persistentvolumeclaim) group_left kube_pod_spec_volumes_persistentvolumeclaims_info) == 1', + expr: 'kube_persistentvolumeclaim_info UNLESS ON (namespace, persistentvolumeclaim) count by (namespace, persistentvolumeclaim) (kube_pod_spec_volumes_persistentvolumeclaims_info) == 1', 'for': '5m', labels: { severity: 'info', From 1d18bd3177de8a878ed4d244ea6ea8a5729af676 Mon Sep 17 00:00:00 2001 From: Abhilash Shetty Date: Mon, 2 Jun 2025 08:51:33 +0000 Subject: [PATCH 2/3] fix(plugin): typo in nix source Signed-off-by: Abhilash Shetty --- nix/lib/sourcer.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nix/lib/sourcer.nix b/nix/lib/sourcer.nix index d3d80d5..3d99dfe 100644 --- a/nix/lib/sourcer.nix +++ b/nix/lib/sourcer.nix @@ -13,7 +13,7 @@ let # && path != (toString (src + "/utils/dependencies/scripts/release.sh")) ); path = src; - name = "puls8"; + name = "monitoring"; }; in { From 709367a30252e6edf539c74aa1f59af56ff4a504 Mon Sep 17 00:00:00 2001 From: Abhilash Shetty Date: Mon, 2 Jun 2025 08:52:15 +0000 Subject: [PATCH 3/3] chore(chart): bump helm version Signed-off-by: Abhilash Shetty --- deploy/charts/Chart.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deploy/charts/Chart.yaml b/deploy/charts/Chart.yaml index 62134b5..ab13676 100644 --- a/deploy/charts/Chart.yaml +++ b/deploy/charts/Chart.yaml @@ -22,12 +22,12 @@ keywords: # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 4.0.1 +version: 4.0.2 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. -appVersion: 4.0.1 +appVersion: 4.0.2 dependencies: - name: kube-prometheus-stack