Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handling Custom Resources with missing metric related labels #1763

Closed
withnale opened this issue Jun 24, 2022 · 3 comments
Closed

Handling Custom Resources with missing metric related labels #1763

withnale opened this issue Jun 24, 2022 · 3 comments
Labels
kind/feature Categorizes issue or PR as related to a new feature.

Comments

@withnale
Copy link

What would you like to be added:

With Custom Resource metrics, at present if a label is specified in the definition which isn't present in the actual custom resources the associated labels are generated as {my_label=<nil>}.

In these circumstances the correct handling is somewhat ambiguous but I believe that nil is not one of the options. Perhaps the best option in these circumstances would be to omit this label altogether.

Why is this needed:

Generating a label with such a malformed value by default seems intrinsically wrong.

@withnale withnale added the kind/feature Categorizes issue or PR as related to a new feature. label Jun 24, 2022
@chrischdi
Copy link
Member

I would also suggest to just not add the label in this case :-)

#1777 would implement that behaviour.

@k8s-ci-robot
Copy link
Contributor

@chrischdi: Closing this issue.

In response to this:

Fixed via #1777, xref: https://github.com/kubernetes/kube-state-metrics/pull/1777/files#diff-1cbeb50a6b171ac66f4fad40018421010ed1733ea97fcb40b65a7ebd5e7e3d77R424

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

No branches or pull requests

3 participants