Closed jonathan-innis closed 4 days ago
Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all
[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
Files with Coverage Reduction | New Missed Lines | % | ||
---|---|---|---|---|
pkg/scheduling/requirements.go | 2 | 98.01% | ||
pkg/controllers/provisioning/scheduling/existingnode.go | 2 | 86.49% | ||
pkg/controllers/provisioning/scheduling/nodeclaim.go | 2 | 87.23% | ||
<!-- | Total: | 6 | --> |
Totals | |
---|---|
Change from base Build 11882312260: | 0.03% |
Covered Lines: | 8663 |
Relevant Lines: | 10685 |
/lgtm /hold
/lgtm
/unhold
Fixes #N/A
Description
This change updates our iteration over domains for TSC, affinity, and anti-affinity. Often, we have cases where we have available domains across the cluster, but those domains aren't available for the node we are currently on. This is specifically true with hostname requirements where there is only one option that the node can carry.
Rather than looping through all domain options and adding those as possibilities when they were never really possible because the node doesn't support it, this change adds an optimization to only loop through the available node domains if it's shorter than all available domains.
For hostname, this turns our O(node) operation into an O(1) operation to validate whether the pod can fit on the node.
Before
After
How was this change tested?
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.