Enforce singleton GPUCluster name and select ClusterPolicy by creation time - #2689
Merged
Conversation
karthikvetrivel
force-pushed
the
kv-singleton-resolution
branch
from
July 28, 2026 19:23
2e74208 to
3177a01
Compare
karthikvetrivel
marked this pull request as ready for review
July 28, 2026 19:28
karthikvetrivel
requested review from
cdesiniotis,
rahulait,
rajathagasthya,
shivamerla and
tariq1890
as code owners
July 28, 2026 19:28
karthikvetrivel
force-pushed
the
kv-singleton-resolution
branch
from
July 28, 2026 20:44
3177a01 to
c17b3f0
Compare
cdesiniotis
approved these changes
Jul 28, 2026
rajathagasthya
approved these changes
Jul 28, 2026
tariq1890
reviewed
Jul 28, 2026
tariq1890
reviewed
Jul 28, 2026
karthikvetrivel
force-pushed
the
kv-singleton-resolution
branch
2 times, most recently
from
July 28, 2026 21:14
0f2c0a6 to
dc6f211
Compare
Contributor
|
@karthikvetrivel Can we amend the PR title and commit as well? Note, the reason I am being particular here is that we don't really |
tariq1890
reviewed
Jul 28, 2026
tariq1890
reviewed
Jul 28, 2026
tariq1890
reviewed
Jul 28, 2026
…n time Signed-off-by: Karthik Vetrivel <kvetrivel@nvidia.com>
karthikvetrivel
force-pushed
the
kv-singleton-resolution
branch
from
July 28, 2026 21:37
dc6f211 to
a6f6dbf
Compare
tariq1890
approved these changes
Jul 28, 2026
karthikvetrivel
enabled auto-merge
July 28, 2026 21:41
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.
With multiple CRs of a kind, controllers resolved "the active one" inconsistently: the owning controllers kept a first-reconciled-wins claim in memory (unstable across operator restarts, invisible to other controllers), while
resolveActiveConfigpicked the first list item. This PR makes the singleton deterministic for both kinds:metadata.nametogpu-cluster(the name the Helm chart creates), enforcing the singleton at admission. That makes the controller's runtime singleton handling dead code, so it is removed: the in-memory first-wins claim and theignoredstatus value are gone, and the sample is renamed togpu-cluster. GPUCluster has not shipped, so there is no upgrade path to consider.creationTimestamp(name as tie-breaker) is treated as the singleton, via a newgetSingletonClusterPolicyhelper used by the ClusterPolicy controller,resolveActiveConfig, and the GPUCluster prerequisite check (which now inspects only the singleton ClusterPolicy). This selection is a heuristic: ideally the operator would hold a reference to the singleton ClusterPolicy globally throughout its lifetime, and until it does, picking the oldest is the next-best approach.Deleting the singleton ClusterPolicy promotes the next-oldest lazily (on its next reconcile), same as today.