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

feat: only operate on cloudprovider managed resources #1818

Closed jmdeal closed 1 day ago

jmdeal commented 1 week ago

Fixes #N/A

Description Karpenter should only operate on resources which are managed by the cloudprovider consuming this library. The CloudProvider provides a list of supported NodeClasses, Karpenter will assume ownership of any resource with a ref on one of those NodeClasses.

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.

coveralls commented 3 days ago

Pull Request Test Coverage Report for Build 11993136153

Details


Changes Missing Coverage Covered Lines Changed/Added Lines %
pkg/controllers/metrics/nodepool/controller.go 7 8 87.5%
pkg/controllers/node/termination/controller.go 5 6 83.33%
pkg/controllers/nodeclaim/expiration/controller.go 7 8 87.5%
pkg/controllers/nodeclaim/lifecycle/registration.go 3 4 75.0%
pkg/controllers/nodepool/hash/controller.go 11 12 91.67%
pkg/controllers/nodepool/validation/controller.go 6 7 85.71%
pkg/controllers/state/informer/nodepool.go 7 8 87.5%
pkg/controllers/nodeclaim/lifecycle/controller.go 6 8 75.0%
pkg/controllers/nodeclaim/podevents/controller.go 5 7 71.43%
pkg/controllers/provisioning/provisioner.go 20 22 90.91%
<!-- Total: 240 386 62.18% -->
Files with Coverage Reduction New Missed Lines %
pkg/utils/node/node.go 1 70.21%
pkg/utils/nodeclaim/nodeclaim.go 2 42.14%
pkg/controllers/nodepool/counter/controller.go 4 69.23%
<!-- Total: 7 -->
Totals Coverage Status
Change from base Build 11964513047: -0.04%
Covered Lines: 8839
Relevant Lines: 10910

💛 - Coveralls
jmdeal commented 3 days ago

Holding while I do testing with the AWS provider

/hold

jmdeal commented 1 day ago

/unhold

k8s-ci-robot commented 1 day ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jmdeal, 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: - ~~[OWNERS](https://github.com/kubernetes-sigs/karpenter/blob/main/OWNERS)~~ [jonathan-innis] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment