kubernetes-sigs / karpenter

Karpenter is a Kubernetes Node Autoscaler built for flexibility, performance, and simplicity.
Apache License 2.0
641 stars 207 forks source link

fix: ensure node leases aren't leaked #1807

Closed jmdeal closed 1 week ago

jmdeal commented 1 week ago

Fixes #N/A

Description

This PR makes two changes to the NodeClaim lifecycle controller to ensure node leases aren't leaked:

How was this change tested? make test

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

njtran commented 1 week ago

/hold

coveralls commented 1 week ago

Pull Request Test Coverage Report for Build 11802960194

Details


Changes Missing Coverage Covered Lines Changed/Added Lines %
pkg/controllers/nodeclaim/lifecycle/controller.go 10 15 66.67%
<!-- Total: 13 18 72.22% -->
Files with Coverage Reduction New Missed Lines %
pkg/controllers/nodeclaim/lifecycle/controller.go 1 71.07%
pkg/utils/nodeclaim/nodeclaim.go 2 37.07%
pkg/controllers/nodeclaim/lifecycle/initialization.go 3 86.11%
<!-- Total: 6 -->
Totals Coverage Status
Change from base Build 11787793721: -0.005%
Covered Lines: 8476
Relevant Lines: 10486

💛 - Coveralls
k8s-ci-robot commented 1 week ago

[APPROVALNOTIFIER] This PR is APPROVED

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

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: - ~~[OWNERS](https://github.com/kubernetes-sigs/karpenter/blob/main/OWNERS)~~ [jonathan-innis,njtran] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
jonathan-innis commented 1 week ago

/remove-hold