Skip to content

feat(): add Conditions to ClusterStatus for worker-to-hub connection health - #47

Open
sumanthd032 wants to merge 2 commits into
kubeslice:masterfrom
sumanthd032:feat/cluster-connection-conditions
Open

feat(): add Conditions to ClusterStatus for worker-to-hub connection health#47
sumanthd032 wants to merge 2 commits into
kubeslice:masterfrom
sumanthd032:feat/cluster-connection-conditions

Conversation

@sumanthd032

Copy link
Copy Markdown

Description

Adds Conditions []metav1.Condition to ClusterStatus, so a worker operator can report a ControllerConnected/ControllerEndpointSynced-style condition about its own hub connection. Types and deepcopy only, no CRD regeneration, matching the precedent set by the existing ActiveController field.

Stacked on #46. Only this one field is new here.

How Has This Been Tested?

go build ./... and go vet ./... clean. Deepcopy verified by inspection: additive only, zz_generated.deepcopy.go diff is exactly the new slice's copy loop.

Checklist:

  • The title of the PR states what changed and the related issues number (used for the release note).
  • Does this PR requires documentation updates?
  • I've updated documentation as required by this PR.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have tested it for all user roles.
  • I have added all the required unit test cases.

Does this PR introduce a breaking change for other components like worker-operator?

No. Purely additive field.


…ller HA

Adds the API carrier for Active/Standby high availability of the KubeSlice
controller, where two hub clusters run the controller and worker clusters
must find the Active again after a failover with no manual reconfiguration.

- ClusterStatus.ActiveController (*ActiveControllerInfo)
- ActiveControllerInfo: Endpoint, CABundle, ActiveIdentity, LastUpdated

Each hub writes this field about itself, on its own API server, and only
while it holds leadership. A Standby's copy is populated by the state
mirror from the Active, so it names the Active rather than itself. That
lets a worker watching both hub endpoints identify the Active by the rule
"trust whichever endpoint is reachable and reports an ActiveIdentity
matching that endpoint's own identity", without needing to know which role
either hub currently holds, and without inferring a death from a timeout.

LastUpdated gives a consumer a deterministic tie-break if a partition
causes both hubs to self-declare at once; without a freshness signal on
the object itself a worker would have to read coordination.k8s.io Leases
across clusters to resolve it. StorageCapabilities.LastUpdated in this
same struct is existing precedent for the pattern.

Additive only, all fields omitempty, no existing field changed. A
deployment that never publishes the field leaves it nil, which is exactly
the non-HA case.

Fixes kubeslice#45

Signed-off-by: Sumanth D <sumanthd032@gmail.com>
…alth

Worker operator will use this to report ControllerConnected and ControllerEndpointSynced.

Signed-off-by: Sumanth D <sumanthd032@gmail.com>
sumanthd032 added a commit to sumanthd032/worker-operator that referenced this pull request Aug 26, 2026
Pulls in ActiveController/StorageCapabilities (already merged locally, never
vendored) and the new Conditions field kubeslice#469 needs. Pinned to the fork commit
behind kubeslice/apis#47; drop the replace once that merges and a release
carries the field.

Signed-off-by: Sumanth D <sumanthd032@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant