reduce nvidiadriver reconciles on unrelated node label updates - #2683
Open
rahulait wants to merge 1 commit into
Open
reduce nvidiadriver reconciles on unrelated node label updates#2683rahulait wants to merge 1 commit into
rahulait wants to merge 1 commit into
Conversation
rahulait
force-pushed
the
better-reconciles-for-nvidiadriver
branch
4 times, most recently
from
July 27, 2026 23:42
45d40de to
b87db38
Compare
rahulait
marked this pull request as ready for review
July 27, 2026 23:58
rahulait
requested review from
cdesiniotis,
karthikvetrivel,
rajathagasthya,
shivamerla and
tariq1890
as code owners
July 27, 2026 23:58
rahulait
force-pushed
the
better-reconciles-for-nvidiadriver
branch
4 times, most recently
from
July 28, 2026 13:39
b85ec88 to
ff94093
Compare
Signed-off-by: Rahul Sharma <rahulsharm@nvidia.com>
rahulait
force-pushed
the
better-reconciles-for-nvidiadriver
branch
from
July 28, 2026 14:18
ff94093 to
098229f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
summary
This PR reduces unnecessary NVIDIADriver reconciles from unrelated GPU node label updates.
Previously, any label change on a GPU node passed the NVIDIADriver node watch predicate. That caused the controller to list all NVIDIADriver objects and enqueue all of them, even when the changed label could not affect driver ownership, daemonset rendering, scheduling, or status.
Now, the node watch predicate first checks whether the changed label is relevant to NVIDIADriver behavior. Unrelated GPU node label updates are ignored before listing NVIDIADrivers. Relevant label updates still list and enqueue all NVIDIADrivers so owner and non-owner driver status stays correct.
behavior change
team=platformenvironment=stagingcustom.company.com/maintenance=truenvidia.com/gpu-operator.driver.ownernvidia.com/gpu.presentnvidia.com/gpu.deploy.drivernvidia.com/gpu.deploy.vgpu-managerNVIDIADriver.spec.nodeSelector, for exampleregion=us-east-1what counts as unrelated
A GPU node label update is unrelated when the changed label cannot affect NVIDIADriver ownership, daemonset rendering, scheduling, or status.
team=platformteaminspec.nodeSelectorenvironment=stagingenvironmentinspec.nodeSelectortopology.kubernetes.io/zone=us-east-1atopology.kubernetes.io/zoneinspec.nodeSelectorcustom.company.com/maintenance=truecustom.company.com/maintenanceinspec.nodeSelectorfoo=barfooinspec.nodeSelectorwhat counts as relevant
A GPU node label update is relevant when the changed label can affect NVIDIADriver ownership, daemonset rendering, scheduling, or status.
nvidia.com/gpu-operator.driver.ownernvidia.com/gpu.presentnvidia.com/gpu.deploy.drivernvidia.com/gpu.deploy.vgpu-managerregion=us-east-1regioninspec.nodeSelectorteam=platformteaminspec.nodeSelectorwhy relevant updates still enqueue all NVIDIADrivers
Relevant label updates still enqueue all NVIDIADrivers intentionally.
A node label change can affect drivers that do not currently own the node. For example,
driver-amay own a node, whiledriver-bhas:If the node gets region=us-east-1, driver-b must reconcile and report notReady because it now conflicts with driver-a. When that label is removed, driver-b must reconcile again and return to ready.
Because of that, this PR only suppresses unrelated label updates. It does not reduce fanout for relevant label updates.
how the selector-key cache helps
The controller needs to treat labels from
NVIDIADriver.spec.nodeSelectoras relevant, because changing one of those labels can change driver ownership or create/resolve selector conflicts.Without a cache, the only way to know whether a changed node label is used by any NVIDIADriver selector is to list all NVIDIADriver objects on every GPU node label update.
This PR adds a small cache of node selector keys used by existing NVIDIADriver specs. The node watch predicate can check that cache before deciding whether the update is relevant.
team=platform, no NVIDIADriver selectsteamteamis relevantteamis not used, ignore updateregion=us-east-1, some NVIDIADriver selectsregionregionis relevantregionis used, list/enqueue all NVIDIADriversnvidia.com/gpu.deploy.driverThe cache does not reduce fanout for relevant label changes. Relevant updates still enqueue all NVIDIADrivers intentionally, because a node label change can affect drivers that do not currently own the node.
The cache helps by avoiding the expensive list/enqueue path for unrelated label changes.
Checklist
make lint)make validate-generated-assets)make validate-modules)Testing