-
Notifications
You must be signed in to change notification settings - Fork 38
docs: add docs/architecture.md #351
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
Conversation
|
@ryanzhang-oss, ptal? I think this one is nearly done; still finishing Azure/fleet-networking#148 . |
| The following fleet use cases are implemented: | ||
|
|
||
| 1. **Join/Leave**: member clusters can join and leave a fleet. | ||
| 1. **Cluster resource placement (CRP)**: arbitrary Kubernetes resources can be replicated from a hub to one or more members, building upon |
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.
we are deprecating this repo. It's better to refer to the upstream https://github.com/kubernetes-sigs/work-api
| 1. [MemberCluster.fleet.azure.com](https://github.com/Azure/fleet/blob/master/apis/v1alpha1/membercluster_types.go#:~:text=type%20MemberCluster%20struct%20%7B) | ||
| (hub cluster, not namespaced) | ||
|
|
||
| Desired state of a member cluster (Join/Leave), cluster principal identity and heartbeat. Administrative status and resource usage. |
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.
The identity is just a generic k8s identity. Not related to the member cluster.
| (hub cluster, not namespaced) | ||
|
|
||
| Desired state of a member cluster (Join/Leave), cluster principal identity and heartbeat. Administrative status and resource usage. | ||
| Typically owned by the Fleet RP. |
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.
I think it's better not to mention RP in the github document. RP is our internal implementation detail while the github solution works for any k8s cluster.
| 1. [InternalMemberCluster.fleet.azure.com](https://github.com/Azure/fleet/blob/master/apis/v1alpha1/internalmembercluster_types.go#:~:text=type%20InternalMemberCluster%20struct%20%7B) | ||
| (hub cluster, fleet-member-\* namespaces) | ||
|
|
||
| Internal mirror of MemberCluster resource, hosted in fleet-member-\* namespaces for communication with member clusters. Owned by the |
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.
IMC's spec is maintained by the hub controller but its status is maintained by the member controller
|
|
||
| ## Webhooks | ||
|
|
||
| ### Join/Leave |
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.
IIRC, the webhooks are not really related to any specific operation
| * Update of *MemberClusters* -> memberclusterplacement controller. | ||
| * Create/update/delete of any[*] watchable resource -> resourcechange controller. | ||
|
|
||
| [*] resourcewatcher excludes some resources from being enqueued to the resourcechange controller, e.g.: |
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.
I feel that this list can change often, so it might be hard to maintain this doc up to date.
| * Create/update/delete of *ClusterResourcePlacements* -> clusterresourceplacement controller. | ||
| * Update/delete of *Works* -> clusterresourceplacement controller. | ||
| * Update of *MemberClusters* -> memberclusterplacement controller. | ||
| * Create/update/delete of any[*] watchable resource -> resourcechange controller. |
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.
It might be good to explain what the resourceChange controller does to make the picture whole. There is an internal architect diagram you can borrow too.
Signed-off-by: Zhiying Lin <zhiyingl456@gmail.com>
Description of your changes
Add architecture doc
I have:
make reviewableto ensure this PR is ready for review.How has this code been tested
N/A
Special notes for your reviewer