Skip to content

Additional Labels not exported by KSM #2311

Open
@bhanugarg23

Description

@bhanugarg23

What happened:

I am not able to add additional pod and deployment labels into the metrics exported by KSM. I have setup KSM via helm inside AWS EKS. Below is the change I made in the values file to add allow the additional label for pods

metricLabelsAllowlist:
- pods=[deplEnv]

Here deplEnv is the label key. When I apply this change in the values file, I am seeing this extra args being passed in the deployment. When I port forward the KSM service I am not able to see this label in any of the metrics on the /metrics page.

What you expected to happen:

Label with the key deplEnv visible in the pod and deployment metrics

How to reproduce it (as minimally and precisely as possible):

Apply the kube-state-metrics helm chart in AWS EKS(version 1.27) with the change mentioned above in the values file and then port forward the service

Anything else we need to know?:

Environment:

  • kube-state-metrics version: 2.10.1
  • Kubernetes version (use kubectl version): 1.27
  • Cloud provider or hardware configuration: AWS EKS
  • Other info:

Metadata

Metadata

Assignees

Labels

kind/bugCategorizes issue or PR as related to a bug.kind/supportCategorizes issue or PR as a support question.triage/acceptedIndicates an issue or PR is ready to be actively worked on.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions