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

feat: add deprovisioning metrics for eligible machines #331

Merged
merged 10 commits into from
May 10, 2023

Conversation

njtran
Copy link
Contributor

@njtran njtran commented May 9, 2023

Fixes #

Description
This adds in metrics to distinguish per-deprovisioner metrics and adds in a metric that shows how many machines are eligible for deprovisioning

How was this change tested?

  • make presubmit
  • make apply && look at prometheus server

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@njtran njtran requested a review from a team as a code owner May 9, 2023 22:56
@njtran njtran requested a review from jonathan-innis May 9, 2023 22:56
@coveralls
Copy link

coveralls commented May 9, 2023

Pull Request Test Coverage Report for Build 4940667117

  • 14 of 14 (100.0%) changed or added relevant lines in 8 files are covered.
  • 3 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+0.01%) to 81.223%

Files with Coverage Reduction New Missed Lines %
pkg/controllers/node/controller.go 3 76.47%
Totals Coverage Status
Change from base Build 4918293087: 0.01%
Covered Lines: 6891
Relevant Lines: 8484

💛 - Coveralls

@njtran njtran enabled auto-merge (squash) May 9, 2023 23:18
Copy link
Member

@jonathan-innis jonathan-innis left a comment

Choose a reason for hiding this comment

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

Should we go ahead and add the metric on deprovisioner_evaluation_latency into this PR as well so that we get details on the number of times a given deprovisioner has run and the time, on average, each one takes to run

pkg/controllers/deprovisioning/controller.go Outdated Show resolved Hide resolved
pkg/controllers/deprovisioning/metrics.go Show resolved Hide resolved
Copy link
Member

@jonathan-innis jonathan-innis left a comment

Choose a reason for hiding this comment

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

Should we go ahead and add the metric on deprovisioner_evaluation_latency into this PR as well so that we get details on the number of times a given deprovisioner has run and the time, on average, each one takes to run

@njtran njtran disabled auto-merge May 10, 2023 17:47
Copy link
Member

@jonathan-innis jonathan-innis left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

pkg/controllers/deprovisioning/controller.go Outdated Show resolved Hide resolved
@njtran njtran enabled auto-merge (squash) May 10, 2023 19:58
@njtran njtran merged commit 4b3fcb8 into kubernetes-sigs:main May 10, 2023
bwagner5 pushed a commit to bwagner5/karpenter-core that referenced this pull request May 16, 2023
…gs#331)

* feat: add metrics for deprovisioning for each deprovisioner

* add string functions and populate metric call

* rebase

* remove naming

* fix names

* comments

* revert to histogram

* revert label

* inc

* add expiration
@bwagner5 bwagner5 mentioned this pull request May 16, 2023
bwagner5 pushed a commit that referenced this pull request May 16, 2023
* feat: add metrics for deprovisioning for each deprovisioner

* add string functions and populate metric call

* rebase

* remove naming

* fix names

* comments

* revert to histogram

* revert label

* inc

* add expiration
@njtran njtran deleted the metrics branch December 5, 2023 23:27
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants