From d379f1f7b056966b95626ddc7724a74130ef6a2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Andr=C3=A9?= Date: Fri, 2 Aug 2024 08:23:52 +0200 Subject: [PATCH] Remove `kube_*_annotations` from deny list Since https://github.com/kubernetes/kube-state-metrics/pull/2145, kube-state-metrics does not collect `kube_*_annotations` metrics by default. It's no longer necessary to add them to the metrics' deny list. Removing `kube_*_annotations` from the deny list allows us to enable scrapping of annotation metrics via the `--metric-annotations-allowlist` option. Additionally, we were missing a comma, which might have been a problem in the comma-separated list of arguments. --- assets/kube-state-metrics/deployment.yaml | 1 - jsonnet/components/kube-state-metrics.libsonnet | 1 - 2 files changed, 2 deletions(-) diff --git a/assets/kube-state-metrics/deployment.yaml b/assets/kube-state-metrics/deployment.yaml index 568a8fe3d5..3dd66b6e78 100644 --- a/assets/kube-state-metrics/deployment.yaml +++ b/assets/kube-state-metrics/deployment.yaml @@ -39,7 +39,6 @@ spec: - | --metric-denylist= ^kube_secret_labels$, - ^kube_.+_annotations$ ^kube_customresource_.+_annotations_info$, ^kube_customresource_.+_labels_info$, - --metric-labels-allowlist=pods=[*],nodes=[*],namespaces=[*],persistentvolumes=[*],persistentvolumeclaims=[*],poddisruptionbudgets=[*] diff --git a/jsonnet/components/kube-state-metrics.libsonnet b/jsonnet/components/kube-state-metrics.libsonnet index accc1198bb..892499f1c2 100644 --- a/jsonnet/components/kube-state-metrics.libsonnet +++ b/jsonnet/components/kube-state-metrics.libsonnet @@ -240,7 +240,6 @@ function(params) ||| --metric-denylist= ^kube_secret_labels$, - ^kube_.+_annotations$ ^kube_customresource_.+_annotations_info$, ^kube_customresource_.+_labels_info$, |||,