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

chore: Add pod/node count to metrics and logs for disruption #1025

Merged

Conversation

jonathan-innis
Copy link
Member

@jonathan-innis jonathan-innis commented Feb 19, 2024

Fixes #N/A

Description

This adds a disrupted reschedulable pod count metric along with a disrupted node count metric. This also adds a pod count to the log that is printed when we disrupt nodes. This would help in debugging issues like in #1014 where it's tough to tell if a node is terminated with nodes bound or not.

How was this change tested?

make presubmit

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

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. approved Indicates a PR has been approved by an approver from all required OWNERS files. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Feb 19, 2024
@coveralls
Copy link

coveralls commented Feb 19, 2024

Pull Request Test Coverage Report for Build 7963757649

Details

  • -2 of 57 (96.49%) changed or added relevant lines in 11 files are covered.
  • 4 unchanged lines in 2 files lost coverage.
  • Overall coverage increased (+0.01%) to 80.737%

Changes Missing Coverage Covered Lines Changed/Added Lines %
pkg/controllers/disruption/multinodeconsolidation.go 1 2 50.0%
pkg/controllers/disruption/singlenodeconsolidation.go 1 2 50.0%
Files with Coverage Reduction New Missed Lines %
pkg/controllers/node/termination/terminator/eviction.go 2 88.79%
pkg/test/expectations/expectations.go 2 95.96%
Totals Coverage Status
Change from base Build 7938655773: 0.01%
Covered Lines: 8014
Relevant Lines: 9926

💛 - Coveralls

pkg/controllers/disruption/metrics.go Outdated Show resolved Hide resolved
pkg/controllers/disruption/metrics.go Show resolved Hide resolved
pkg/controllers/disruption/metrics.go Show resolved Hide resolved
pkg/controllers/disruption/controller.go Show resolved Hide resolved
pkg/controllers/disruption/suite_test.go Show resolved Hide resolved
pkg/controllers/disruption/suite_test.go Show resolved Hide resolved
@Bryce-Soghigian
Copy link
Member

Very useful metrics, excited to see this!

@jonathan-innis
Copy link
Member Author

@Bryce-Soghigian Thanks for the feedback.

Copy link
Contributor

@engedaam engedaam left a comment

Choose a reason for hiding this comment

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

/lgtm

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: engedaam, jonathan-innis

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 df29083 into kubernetes-sigs:main Feb 19, 2024
12 checks passed
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/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants