feat(): add ActiveController to ClusterStatus for Active/Standby controller HA - #46
Open
sumanthd032 wants to merge 1 commit into
Open
feat(): add ActiveController to ClusterStatus for Active/Standby controller HA#46sumanthd032 wants to merge 1 commit into
sumanthd032 wants to merge 1 commit into
Conversation
…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>
7 tasks
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.
Description
Adds
ActiveControllertoClusterStatus, carrying the endpoint, CA bundle, identity and last-updated timestamp of the hub controller that currently holds leadership.This is the field a worker reads to find the Active hub after a failover, for the Active/Standby HA work (kubeslice-controller #293, #297 and worker-operator #467). It lives here because kubeslice-controller writes it and worker-operator reads it, and both consume this module.
Additive only, all fields omitempty, no existing field changed. Follows the shape of 83d1dac.
A tagged release after merge would help: worker-operator needs to bump this dependency before #467 can consume the field.
Fixes #45
How Has This Been Tested?
make generatewith the repo's pinned controller-gen; the only generated additions are the deepcopy methods for the new type and the nil-guarded pointer copy inClusterStatus.DeepCopyInto.go build ./...,go vet ./...,gofmt -l pkg/clean.Checklist:
Does this PR introduce a breaking change for other components like kubeslice-controller, worker-operator?
No, additive fields only.