kube-state-metrics icon indicating copy to clipboard operation
kube-state-metrics copied to clipboard

[FEATURE] Add kube_*_labels for custom resources if enabled

Open QuentinBisson opened this issue 3 years ago • 2 comments

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

QuentinBisson avatar Sep 19 '22 21:09 QuentinBisson

[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.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment Approvers can cancel approval by writing /approve cancel in a comment

k8s-ci-robot avatar Sep 19 '22 21:09 k8s-ci-robot

I could use some help on the documentation part as I'm not sure how to document this properly

QuentinBisson avatar Sep 19 '22 21:09 QuentinBisson

[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.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment Approvers can cancel approval by writing /approve cancel in a comment

k8s-ci-robot avatar Nov 14 '22 15:11 k8s-ci-robot

@fpetkovski I included your comments :)

QuentinBisson avatar Nov 16 '22 12:11 QuentinBisson

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/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was 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

k8s-triage-robot avatar Mar 11 '23 18:03 k8s-triage-robot

/remove-lifecycle stale

dgrisonnet avatar Mar 29 '23 14:03 dgrisonnet

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.

dgrisonnet avatar Mar 29 '23 14:03 dgrisonnet