Skip to content

Conversation

Rishab87
Copy link
Contributor

What this PR does / why we need it:
Implements ResourceMetricsConfig to allow users to define custom metrics for core Kubernetes resources (Pods, Deployments, etc.) via YAML configuration. This enables users to create only the metrics they need, reducing cardinality and eliminating the complexity of allowlists/denylists. The feature reuses the proven CustomResourceState metric generation system for familiar configuration syntax.

How does this change affect the cardinality of KSM: (increases, decreases or does not change cardinality)
Decreases cardinality by allowing users to define only specific metrics they need instead of all default metrics for a resource type.

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 #2165

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Aug 22, 2025
@k8s-ci-robot k8s-ci-robot requested review from mrueg and rexagod August 22, 2025 18:44
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Rishab87
Once this PR has been reviewed and has the lgtm label, please assign rexagod for approval. For more information see the 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 k8s-ci-robot added the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label Aug 22, 2025
@k8s-ci-robot
Copy link
Contributor

This issue is currently awaiting triage.

If kube-state-metrics contributors determine this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

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-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Aug 22, 2025
@mrueg
Copy link
Member

mrueg commented Aug 22, 2025

Just before you continue on this, it would be good to sync with @rexagod and myself as there's kubernetes/enhancements#4811 https://github.com/rexagod/resource-state-metrics out there as well :)

@rexagod rexagod moved this to Backlog or Awaiting Response in SIG Instrumentation Aug 30, 2025
@rexagod rexagod moved this from Backlog or Awaiting Response to Needs Triage in SIG Instrumentation Aug 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
Status: Needs Triage
Development

Successfully merging this pull request may close these issues.

Resource Metrics as Config
3 participants