[FEATURE] Add kube_*_labels for custom resources if enabled
What this PR does / why we need it:
This PR allows the creation of a kube_*_ labels metrics for the custom resources
How does this change affect the cardinality of KSM: (increases, decreases or does not change cardinality) This change will add a new metric per enabled CRD in KSM
Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #1832
[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: QuentinBisson
Once this PR has been reviewed and has the lgtm label, please assign mrueg for approval by writing /assign @mrueg in a comment. For more information see:The Kubernetes Code Review Process.
The full list of commands accepted by this bot can be found here.
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
I could use some help on the documentation part as I'm not sure how to document this properly
[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: QuentinBisson
Once this PR has been reviewed and has the lgtm label, please assign mrueg for approval by writing /assign @mrueg in a comment. For more information see the Kubernetes Code Review Process.
The full list of commands accepted by this bot can be found here.
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
@fpetkovski I included your comments :)
The Kubernetes project currently lacks enough contributors to adequately respond to all PRs.
This bot triages PRs according to the following rules:
- After 90d of inactivity,
lifecycle/staleis applied - After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied - After 30d of inactivity since
lifecycle/rottenwas applied, the PR is closed
You can:
- Mark this PR as fresh with
/remove-lifecycle stale - Close this PR with
/close - Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
/remove-lifecycle stale
I commented about this in https://github.com/kubernetes/kube-state-metrics/issues/1832#issuecomment-1322518103.
I am not in favor of this change since it is already possible to add labels and annotations metrics via the custom resource configuration. I don't think these metrics are worth to have by default and I would expect anyone needing these metrics to write a configuration for them.