Repository navigation
Read driver upgrade state from the manager cache - #3217
Draft
rajathagasthya wants to merge 1 commit into
Draft
rajathagasthya wants to merge 1 commit into
rajathagasthya wants to merge 1 commit into
Conversation
| mgr.GetEventRecorderFor("nvidia-gpu-operator"), | ||
| upgrade.StateOptions{}, | ||
| // Read Nodes and the driver DaemonSets and Pods from the manager cache. | ||
| upgrade.StateOptions{Client: mgr.GetClient()}, |
rajathagasthya
force-pushed
the
upgrade-shared-cache-client
branch
from
November 10, 2026 17:55
3007fdc to
96b31a1
Compare
rajathagasthya
force-pushed
the
upgrade-shared-cache-client
branch
from
November 13, 2026 16:37
96b31a1 to
f1609fc
Compare
The upgrade state manager reads the driver DaemonSets, the driver Pods, and every node with a driver pod from the API server on every pass, also when no upgrade is in progress. Pass the manager's client to NewClusterUpgradeStateManager so that it reads these objects from the cache. The Node cache transform now keeps spec.unschedulable and the Ready condition, which the upgrade library reads to count unavailable nodes and to uncordon. The vendored k8s-operator-libs is an unreleased commit and needs a release before this merges. Signed-off-by: Rajath Agasthya <ragasthya@nvidia.com>
rajathagasthya
force-pushed
the
upgrade-shared-cache-client
branch
from
November 13, 2026 16:41
f1609fc to
731047f
Compare
This branch has not been deployed
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.
Issue
None.
Description
The upgrade state manager reads the driver DaemonSets, the driver Pods, and every node with a driver pod from the API server on every pass, also when no upgrade is in progress. Pass the manager's client to
NewClusterUpgradeStateManagerso that it reads these objects from the cache. The Node cache transform now keepsspec.unschedulableand theReadycondition, which the upgrade library reads to count unavailable nodes and to uncordon.Companion to NVIDIA/k8s-operator-libs#164, which adds a client parameter to
NewClusterUpgradeStateManager. This PR vendors that change asv0.0.0-20261113163306-991fa4a9a29aand must move to a library release before it merges. The vendor update also brings in the k8s-operator-libs commits merged since the current version.Checklist
make lint) — the only findings are 3 staticcheck SA4023 findings incmd/nvidia-validator/main.go, which upstream main also hasmake validate-generated-assets)make validate-modules)Testing
TestCachechecks that the Node transform keepsspec.unschedulableand theReadycondition.go test ./controllers/... ./cmd/...passes.maxUnavailablelimit and uncordon worked as before. The full results are in Let callers pass the client used by the upgrade state manager k8s-operator-libs#164.