From b5ec93208bcb044a1d78311e18b9280f4c25a3e2 Mon Sep 17 00:00:00 2001
From: Damien Grisonnet <dgrisonn@redhat.com>
Date: Wed, 18 Aug 2021 17:25:13 +0200
Subject: [PATCH] jsonnet: drop deprecated etcd metric

Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>
---
 .../addons/dropping-deprecated-metrics-relabelings.libsonnet    | 2 +-
 manifests/kubernetes-serviceMonitorApiserver.yaml               | 2 +-
 manifests/kubernetes-serviceMonitorKubeControllerManager.yaml   | 2 +-
 manifests/kubernetes-serviceMonitorKubelet.yaml                 | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/jsonnet/kube-prometheus/addons/dropping-deprecated-metrics-relabelings.libsonnet b/jsonnet/kube-prometheus/addons/dropping-deprecated-metrics-relabelings.libsonnet
index 39eba122..374b8601 100644
--- a/jsonnet/kube-prometheus/addons/dropping-deprecated-metrics-relabelings.libsonnet
+++ b/jsonnet/kube-prometheus/addons/dropping-deprecated-metrics-relabelings.libsonnet
@@ -32,7 +32,7 @@
   // Drop all etcd metrics which are deprecated in kubernetes.
   {
     sourceLabels: ['__name__'],
-    regex: 'etcd_(helper_cache_hit_count|helper_cache_miss_count|helper_cache_entry_count|request_cache_get_latencies_summary|request_cache_add_latencies_summary|request_latencies_summary)',
+    regex: 'etcd_(helper_cache_hit_count|helper_cache_miss_count|helper_cache_entry_count|object_counts|request_cache_get_latencies_summary|request_cache_add_latencies_summary|request_latencies_summary)',
     action: 'drop',
   },
   // Drop all transformation metrics which are deprecated in kubernetes.
diff --git a/manifests/kubernetes-serviceMonitorApiserver.yaml b/manifests/kubernetes-serviceMonitorApiserver.yaml
index 58ba773b..cce20bf7 100644
--- a/manifests/kubernetes-serviceMonitorApiserver.yaml
+++ b/manifests/kubernetes-serviceMonitorApiserver.yaml
@@ -31,7 +31,7 @@ spec:
       sourceLabels:
       - __name__
     - action: drop
-      regex: etcd_(helper_cache_hit_count|helper_cache_miss_count|helper_cache_entry_count|request_cache_get_latencies_summary|request_cache_add_latencies_summary|request_latencies_summary)
+      regex: etcd_(helper_cache_hit_count|helper_cache_miss_count|helper_cache_entry_count|object_counts|request_cache_get_latencies_summary|request_cache_add_latencies_summary|request_latencies_summary)
       sourceLabels:
       - __name__
     - action: drop
diff --git a/manifests/kubernetes-serviceMonitorKubeControllerManager.yaml b/manifests/kubernetes-serviceMonitorKubeControllerManager.yaml
index dadc9a26..4aab7701 100644
--- a/manifests/kubernetes-serviceMonitorKubeControllerManager.yaml
+++ b/manifests/kubernetes-serviceMonitorKubeControllerManager.yaml
@@ -31,7 +31,7 @@ spec:
       sourceLabels:
       - __name__
     - action: drop
-      regex: etcd_(helper_cache_hit_count|helper_cache_miss_count|helper_cache_entry_count|request_cache_get_latencies_summary|request_cache_add_latencies_summary|request_latencies_summary)
+      regex: etcd_(helper_cache_hit_count|helper_cache_miss_count|helper_cache_entry_count|object_counts|request_cache_get_latencies_summary|request_cache_add_latencies_summary|request_latencies_summary)
       sourceLabels:
       - __name__
     - action: drop
diff --git a/manifests/kubernetes-serviceMonitorKubelet.yaml b/manifests/kubernetes-serviceMonitorKubelet.yaml
index ea050274..5c6fc6ff 100644
--- a/manifests/kubernetes-serviceMonitorKubelet.yaml
+++ b/manifests/kubernetes-serviceMonitorKubelet.yaml
@@ -32,7 +32,7 @@ spec:
       sourceLabels:
       - __name__
     - action: drop
-      regex: etcd_(helper_cache_hit_count|helper_cache_miss_count|helper_cache_entry_count|request_cache_get_latencies_summary|request_cache_add_latencies_summary|request_latencies_summary)
+      regex: etcd_(helper_cache_hit_count|helper_cache_miss_count|helper_cache_entry_count|object_counts|request_cache_get_latencies_summary|request_cache_add_latencies_summary|request_latencies_summary)
       sourceLabels:
       - __name__
     - action: drop
-- 
GitLab