kubernetes-sigs / karpenter

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

perf: Cache taints for existing nodes #1827

Closed jonathan-innis closed 1 week ago

jonathan-innis commented 1 week ago

Fixes #N/A

Description

Cache taints when checking pod tolerations for existing nodes. We were reconstructing these taints each time we attempted to schedule a pod, but we can realistically calculate this once and then re-use this calculated value

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 commented 1 week ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 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
coveralls commented 1 week ago

Pull Request Test Coverage Report for Build 11886524654

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details


Files with Coverage Reduction New Missed Lines %
pkg/controllers/disruption/consolidation.go 4 88.55%
<!-- Total: 4 -->
Totals Coverage Status
Change from base Build 11886240983: -0.03%
Covered Lines: 8667
Relevant Lines: 10691

💛 - Coveralls