From 0eabbb5d0c180c03d32769cf95034b7b16a8724e Mon Sep 17 00:00:00 2001
From: Arunprasad Rajkumar <arajkuma@redhat.com>
Date: Thu, 3 Feb 2022 19:52:44 +0530
Subject: [PATCH] Sanitize all regex denylist in ksm-lite addon

This is a follow up fix of https://github.com/prometheus-operator/kube-prometheus/pull/1613. @simonpasquier recommended to sanitize all denylist metrics.

Signed-off-by: Arunprasad Rajkumar <arajkuma@redhat.com>
---
 .../kube-prometheus/addons/ksm-lite.libsonnet | 22 +++++++++----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/jsonnet/kube-prometheus/addons/ksm-lite.libsonnet b/jsonnet/kube-prometheus/addons/ksm-lite.libsonnet
index dec2256f..a34655ad 100644
--- a/jsonnet/kube-prometheus/addons/ksm-lite.libsonnet
+++ b/jsonnet/kube-prometheus/addons/ksm-lite.libsonnet
@@ -16,17 +16,17 @@ local addArgs(args, name, containers) = std.map(
             containers: addArgs(
               [|||
                 --metric-denylist=
-                kube_.+_created,
-                kube_.+_metadata_resource_version,
-                kube_replicaset_metadata_generation,
-                kube_replicaset_status_observed_generation,
-                kube_pod_restart_policy,
-                kube_pod_init_container_status_terminated$,
-                kube_pod_init_container_status_running,
-                kube_pod_container_status_terminated$,
-                kube_pod_container_status_running,
-                kube_pod_completion_time,
-                kube_pod_status_scheduled$
+                ^kube_.+_created$,
+                ^kube_.+_metadata_resource_version$,
+                ^kube_replicaset_metadata_generation$,
+                ^kube_replicaset_status_observed_generation$,
+                ^kube_pod_restart_policy$,
+                ^kube_pod_init_container_status_terminated$,
+                ^kube_pod_init_container_status_running$,
+                ^kube_pod_container_status_terminated$,
+                ^kube_pod_container_status_running$,
+                ^kube_pod_completion_time$,
+                ^kube_pod_status_scheduled$
               |||],
               'kube-state-metrics',
               super.containers
-- 
GitLab