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

Add "kube_horizontalpodautoscaler_info" metric #1648

Conversation

Serializator
Copy link
Contributor

What this PR does / why we need it:
Adds a metric which exposes the scaleTargetRef.apiVersion, scaleTargetRef.kind and scaleTargetRef.name of the HorizontalPodAutoscaler resource objects in the cluster.

How does this change affect the cardinality of KSM:

Adding a new metric for the HPA target will have a slight impact on cardinality, but most clusters have at most a double or triple digit amount of HPAs. So we are talking about at most 1000 newly added time series, which is really not that significant compared to the number of time series we export for pods and nodes.

Which issue(s) this PR fixes:
Fixes #1635

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Dec 7, 2021
@Serializator Serializator force-pushed the add-kube-horizontalpodautoscaler-info-metric branch 2 times, most recently from 6d7ac39 to f5b42be Compare December 7, 2021 21:39
@mrueg
Copy link
Member

mrueg commented Dec 7, 2021

/approve

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 7, 2021
@Serializator Serializator force-pushed the add-kube-horizontalpodautoscaler-info-metric branch from f5b42be to bb02daf Compare December 8, 2021 17:44
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Dec 8, 2021
@fpetkovski
Copy link
Contributor

/lgtm Nice work

@mrueg
Copy link
Member

mrueg commented Dec 9, 2021

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 9, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: fpetkovski, mrueg, Serializator

The full list of commands accepted by this bot can be found here.

The pull request process is described 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 merged commit e3056ae into kubernetes:master Dec 9, 2021
@mrueg mrueg mentioned this pull request Dec 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a new metric for HorizontalPodAutoscalar metrics with scaleTargetRef values
4 participants