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 statefulset availablereplicas metric #1532

Merged

Conversation

ravisantoshgudimetla
Copy link
Contributor

What this PR does / why we need it:
StatefulSet minReadySeconds merged upstream and is in alpha stage. This PR bumps api and client-go to v1.22-beta to get AvailableReplicas field of StatefulSet and introduces available replicas metric. I can split bumping into another PR or drop it when 1.22 is released.

How does this change affect the cardinality of KSM: (increases, decreases or does not change cardinality)
It increases the cardinality as we will start tracking available replicas. However, we have been using the similar metrics for deployment and daemonset.

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 #

cc @simonpasquier

@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 Jul 14, 2021
@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jul 14, 2021
@ravisantoshgudimetla ravisantoshgudimetla changed the title [WIP] [Do not merge] Add statefulset availablereplicas metrics [WIP] [Do not merge] Add statefulset availablereplicas metric Jul 14, 2021
@dgrisonnet
Copy link
Member

Looks good from my side 👍.
Holding until Kubernetes v1.22 is out.

/hold

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 15, 2021
@ravisantoshgudimetla
Copy link
Contributor Author

cc @soltysh

@ravisantoshgudimetla ravisantoshgudimetla changed the title [WIP] [Do not merge] Add statefulset availablereplicas metric Add statefulset availablereplicas metric Aug 6, 2021
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 6, 2021
@dgrisonnet
Copy link
Member

/lgtm
/unhold

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 6, 2021
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 6, 2021
@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Aug 6, 2021
Copy link
Member

@lilic lilic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
/approve

Thank you 🎉

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dgrisonnet, lilic, ravisantoshgudimetla

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 added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 6, 2021
@k8s-ci-robot k8s-ci-robot merged commit 8cb2651 into kubernetes:master Aug 6, 2021
mrueg added a commit to mrueg/kube-state-metrics that referenced this pull request Aug 19, 2021
* [FEATURE] Add --use-apiserver-cache flag to set resourceVersion=0 for ListWatch requests kubernetes#1548
* [FEATURE] Introduce metrics for Kubernetes object annotations kubernetes#1468
* [FEATURE] Introduce start time metric for containers in terminated state kubernetes#1519
* [FEATURE] Introduce metrics for cronjob job history limits kubernetes#1535
* [FEATURE] Add system_uuid dimension to kube_node_info metric kubernetes#1535
* [FEATURE] Add available replica metric for statefulsets kubernetes#1532
* [FEATURE] Add ready replica metric for deployments kubernetes#1534
* [CHANGE]  Update go clients for Kubernetes to support 1.22 kubernetes#1545
* [CHANGE]  Use new promlint package and update prometheus cli to 2.28.1 kubernetes#1531
@mrueg mrueg mentioned this pull request Aug 19, 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/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants