-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lighthouse hub-controller enhancement proposal #82
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Hub Controller for Lighthouse | ||
|
||
## Summary | ||
|
||
The current Lighthouse implementation has a passive broker, it is a central apiserver that is | ||
accessed by each cluster in the clusterset. Clusters synchronise resources to and from the | ||
broker with all sync and reconciliation logic implemented in the clusters. | ||
|
||
There are feature gaps that would be much easier to address if we introduce an active broker | ||
that can implement reconciliation logic. | ||
|
||
- `ServiceExport` conflict resolution, per the MCS KEP [^1] | ||
- Merging exported `Services` into single `ServiceImport` | ||
|
||
Benefits of central reconciliation in an active broker include: | ||
|
||
- Single consistent model of intended state, rather than models computed per cluster | ||
- Target state computed _before_ it gets synced out to clusters | ||
- Synchronise fewer resources from broker to each cluster | ||
|
||
## Proposal | ||
|
||
This enhancement proposes to add an mcs-controller to the broker that will implement the | ||
reconciliation logic from `ServiceExport` to `ServiceImport` resources. This will result in a | ||
clear separation of logic for MCS resources: | ||
|
||
- Clusters will sync resources to and from the broker | ||
- The mcs-controller on the broker will reconcile `ServiceImport` object state from the | ||
provided `ServiceExport` state. | ||
|
||
Once an mcs-controller has been introduced, the reconciliation logic will be extended to address | ||
the following open issues: | ||
|
||
- Mark conflicting `ServiceExport` objects with the `ServiceExportConflict` condition | ||
- Merge matching `ServiceExport` objects into a single `ServiceImport` object | ||
|
||
The resulting solution is expected to be less complex overall, ready to be more conformant to | ||
the MCS KEP and to provide opportunity for minimising the data synchronisation between clusters. | ||
|
||
[^1]: [KEP-1645: Multi-Cluster Services API](https://github.com/kubernetes/enhancements/tree/master/keps/sig-multicluster/1645-multi-cluster-services-api#constraints-and-conflict-resolution) |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Passive broker is part of the broader Submariner architecture which emphasizes distributed clusters where each cluster is autonomous, and the broker is simply some mechanism to disseminate the data which is very simple (could've been a simple etcd service and not K8s API).
If we're going to change that, then it should be discussed on a higher level architecturally and not just in the context of Lighthouse.