Skip to content

Conversation

@jim-minter
Copy link
Member

Description of your changes

Add architecture doc

I have:

  • Run make reviewable to ensure this PR is ready for review.

How has this code been tested

N/A

Special notes for your reviewer

@jim-minter
Copy link
Member Author

@ryanzhang-oss, ptal? I think this one is nearly done; still finishing Azure/fleet-networking#148 .

@jim-minter jim-minter marked this pull request as ready for review January 4, 2023 18:55
@jim-minter jim-minter changed the title [WIP] docs: add docs/architecture.md docs: add docs/architecture.md Jan 4, 2023
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
Copy link
Contributor

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.
Copy link
Contributor

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.
Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Contributor

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.:
Copy link
Contributor

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.
Copy link
Contributor

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.

weng271190436 pushed a commit to weng271190436/fleet that referenced this pull request Dec 8, 2025
Signed-off-by: Zhiying Lin <zhiyingl456@gmail.com>
@weng271190436 weng271190436 mentioned this pull request Dec 8, 2025
1 task
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.

2 participants