-
Notifications
You must be signed in to change notification settings - Fork 370
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
Update Multi-cluster architecture doc #3638
Conversation
Codecov Report
@@ Coverage Diff @@
## main #3638 +/- ##
==========================================
- Coverage 63.37% 60.66% -2.72%
==========================================
Files 288 293 +5
Lines 41223 43224 +2001
==========================================
+ Hits 26127 26222 +95
- Misses 13000 14854 +1854
- Partials 2096 2148 +52
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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 we generally use only SVG diagram in the repo.
8829bf3
to
dea9cdb
Compare
Hi @jianjuns I changed a little bit for MC doc, Could you review again? thanks. |
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.
Remove on-prem, public, etc. from the diagrams.
@luolanzone : the current version of user guide looks too complex to follow. I think let us split the PR to two, one for architecture doc, one for user guide, and let me work together with you on the latter. |
9e04232
to
a23f5a7
Compare
@jianjuns I removed this PR from release v1.7, but could you help to review and check if it's Ok to merge in this release? thanks. |
docs/multicluster/architecture.md
Outdated
@@ -8,7 +8,7 @@ ClusterSet, and enforced in all member clusters. | |||
|
|||
The diagram below depicts a basic multi-cluster topology in Antrea. | |||
|
|||
<img src="assets/basic-topology.png" width="500" alt="Antrea Multi-cluster Topology"> | |||
<img src="assets/basic-topology.svg" width="500" alt="Antrea Multi-cluster Topology"> |
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 picture is too small.
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.
Do not use on-prem / public, etc. They are not popular terms with K8s.
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.
Updated.
docs/multicluster/architecture.md
Outdated
@@ -8,7 +8,7 @@ ClusterSet, and enforced in all member clusters. | |||
|
|||
The diagram below depicts a basic multi-cluster topology in Antrea. |
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.
a basic Antrea Multi-cluster topology with one leader cluster and two member clusters.
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.
Updated
docs/multicluster/architecture.md
Outdated
@@ -57,7 +57,7 @@ and encapsulates them into ResourceImports. | |||
|
|||
## Service Export and Import | |||
|
|||
<img src="assets/resource-export-import-pipeline.png" width="800" alt="Antrea Multi-cluster Resource Export/Import Pipeline"> | |||
<img src="assets/resource-export-import-pipeline.svg" width="800" alt="Antrea Multi-cluster Resource Export/Import Pipeline"> |
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 picture is a little small too (hard for me to read the texts).
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.
In the picture, consider:
- Endpoint -> Endpoints
- Monitor -> Watch?
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.
Done
docs/multicluster/architecture.md
Outdated
will be responsible to forward all cross-clusters traffic from local cluster to other member clusters. | ||
Below is the basic architecture for Antrea Multi-cluster Service network connectivity. | ||
|
||
<img src="assets/mc-service-connectivity.svg" width="600" alt="Antrea Multi-cluster Service Connectivity"> |
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.
Again, a little small.
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 should remove "node-a1" around the tunnel line?
A minor one - the color of Cluster C box looks too different from that of Cluster A B. Could we adjust the colors?
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.
yea, node-a1 is added by mistake, it's fixed, and color is adjusted.
docs/multicluster/architecture.md
Outdated
@@ -106,3 +108,52 @@ Multi-cluster admins can also specify certain ClusterNetworkPolicies to be repli | |||
ClusterSet. The ACNP to be replicated should be created as a ResourceExport in the leader cluster, and | |||
the resource export/import pipeline will ensure member clusters receive this ACNP spec to be replicated. | |||
Each member cluster's Multi-cluster Controller will then create an ACNP in their respective clusters. | |||
|
|||
## Antrea Multi-cluster Service Connectivity |
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 "Multi-cluster Service Connectivity" is not a good term for people to understand.
How about "Multi-cluster Gateway" or "Cross-cluster Connectivity".
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.
Rename it to Multi-cluster Gateway"
docs/multicluster/architecture.md
Outdated
|
||
## Antrea Multi-cluster Service Connectivity | ||
|
||
Antrea Multi-cluster supports Service connectivity directly since 1.7.0. It introduces a new feature gate |
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 no need to mention feature gate or particular component configurations in the architecture doc.
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.
Removed
docs/multicluster/architecture.md
Outdated
@@ -84,14 +84,16 @@ been created by the Importer earlier. | |||
|
|||
Antrea Multi-cluster Controller only supports Service of type ClusterIP at this moment. In | |||
order to support multi-cluster Service access between member clusters, Antrea requires member |
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.
Probably talk about the new behavior first, like:
"Since Antrea v1.7.0, Multi-cluster Gateways must be configured to support Multi-cluster Service access across member clusters, and Service CIDRs cannot overlap between clusters. Refer to xxx for more information. Before Antrea v1.7.0, Pod IPs must be directly reachable across clusters for Multi-cluster Service access, and Pod CIDRs cannot overlap between clusters.
docs/multicluster/architecture.md
Outdated
@@ -84,14 +84,16 @@ been created by the Importer earlier. | |||
|
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 this section can be merged to the previous one. Probably just one section called "Antrea Multi-cluster Service", which first introduces what is Multi-cluster Service, and then the implementation, including Service export and import.
Please read your doc and make sure a reader with no knowledge on multi-cluster implementation can understand what you wrote.
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 pipeline is introduced first considering both MC Service and MC network policy depend on this, I will check how to refine it. thanks.
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.
Refined the whole structure and some descriptions.
docs/multicluster/architecture.md
Outdated
@@ -8,7 +8,7 @@ ClusterSet, and enforced in all member clusters. | |||
|
|||
The diagram below depicts a basic multi-cluster topology in Antrea. | |||
|
|||
<img src="assets/basic-topology.png" width="500" alt="Antrea Multi-cluster Topology"> | |||
<img src="assets/basic-topology.svg" width="500" alt="Antrea Multi-cluster Topology"> | |||
|
|||
Given a set of Kubernetes clusters, there will be a leader cluster and several member clusters. |
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.
An Antrea Multi-cluster ClusterSet includes a leader clusters and multiple member clusters.
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.
Done
docs/multicluster/architecture.md
Outdated
@@ -8,7 +8,7 @@ ClusterSet, and enforced in all member clusters. | |||
|
|||
The diagram below depicts a basic multi-cluster topology in Antrea. | |||
|
|||
<img src="assets/basic-topology.png" width="500" alt="Antrea Multi-cluster Topology"> | |||
<img src="assets/basic-topology.svg" width="500" alt="Antrea Multi-cluster Topology"> | |||
|
|||
Given a set of Kubernetes clusters, there will be a leader cluster and several member clusters. | |||
By default, a leader cluster itself is also a member cluster of a ClusterSet. A cluster |
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.
Why by default? Probably copy the description in user guide.
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.
Done
b7c1c0f
to
9fc80ff
Compare
docs/multicluster/architecture.md
Outdated
|
||
<img src="assets/basic-topology.png" width="500" alt="Antrea Multi-cluster Topology"> | ||
<img src="assets/basic-topology.svg" width="650" alt="Antrea Multi-cluster Topology"> |
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.
Other diagrams use Cluster A/B/C. Probably we should change this one too to be consistent.
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.
Done
docs/multicluster/architecture.md
Outdated
Given a set of Kubernetes clusters, there will be a leader cluster and several member clusters. | ||
By default, a leader cluster itself is also a member cluster of a ClusterSet. A cluster | ||
can also be configured as a dedicated leader cluster of multiple ClusterSets. | ||
An Antrea Multi-cluster ClusterSet includes a leader cluster and multiple member clusters. |
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 better to move this paragraph to be before line 9.
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.
Done
docs/multicluster/architecture.md
Outdated
@@ -32,35 +34,50 @@ interface for resource export/import that can be read/written by all member and | |||
in the ClusterSet. The Common Area is implemented with a Namespace in the leader cluster for a | |||
given ClusterSet. | |||
|
|||
## Antrea Multi-cluster Service | |||
|
|||
Since Antrea v1.7.0, Multi-cluster Gateways must be configured to support Multi-cluster Service |
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.
This section makes no sense to be here. And readers do not even know what is Multi-cluster Service from this doc so far.
Anyway, let us do some small adjustment in this PR, and revise later. Let us move this section to be after "Antrea Multi-cluster Controller". And in this section, let us first have the "Service Export and Import" sub-section; and add another sub-section called "Service Access Across Clusters", and move this paragraph there.
docs/multicluster/architecture.md
Outdated
any extra setting. | ||
## Antrea Multi-cluster Gateway | ||
|
||
Antrea Multi-cluster supports Service connectivity directly since 1.7.0. User can choose one of K8s Nodes |
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.
Antrea started to support Multi-cluster Gateway since v1.7.0.
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.
Done
An Antrea Multi-cluster ClusterSet includes a leader cluster and multiple member clusters. | ||
Antrea Multi-cluster Controller needs to be deployed in the leader and all member | ||
clusters. A cluster can serve as the leader, and meanwhile also be a member cluster of the | ||
ClusterSet. | ||
|
||
## Terminology | ||
|
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.
Fix the following:
member of a ClusterSet with unique cluster ID, to claim a ClusterSet with unique ClusterSet ID.
with a unique cluster ID
and to claim a ClusterSet with a unique ClusterSet ID.
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 more natural to talk about ClusterSet first:
The ClusterClaim CRD is used to claim a ClusterSet with a unique ClusterSet ID, and to claim the cluster itself as a member of a ClusterSet with a unique cluster ID.
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.
Done
validates the ClusterSet and Clusterclaim. For resource export/import, it watches ResourceExports | ||
and encapsulates them into ResourceImports. | ||
|
||
## Service Export and Import | ||
### Service Export and Import |
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 meant adding a section at the same level of "## Antrea Multi-cluster Controller" called "## Multi-cluster Controller Service", so the sections are like:
## Antrea Multi-cluster Controller
## Multi-cluster Controller Service
### Service Export and Import
### Service Access Across Clusters
## Multi-cluster Gateway
### Multi-cluster Service Traffic Walk
## Antrea Multi-cluster NetworkPolicy
What you think? BTW, I removed "Antrea" from a few section titles. I feel no need to repeat it in all places.
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.
sure, I will refine it. thanks.
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 suppose you mean ## Multi-cluster Service
in the second item?
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.
Ah, yes
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.
Done
docs/multicluster/architecture.md
Outdated
In a member cluster, Antrea Multi-cluster creates a Deployment that runs Antrea Multi-cluster | ||
Controller which is responsible for exporting resource to and importing resource from a leader | ||
cluster in a ClusterSet. | ||
Antrea Multi-cluster Controller watches ClusterSet, ClutserClaim, Service, ServiceExport etc. |
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.
Remove "watches...". It is not more important than other responsibilities of MC Controller to mention first.
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.
If you want, we can say "Antrea Multi-cluster Controller implements ClusterSet management and resource export/import in the ClusterSet".
docs/multicluster/architecture.md
Outdated
Controller which is responsible for exporting resource to and importing resource from a leader | ||
cluster in a ClusterSet. | ||
Antrea Multi-cluster Controller watches ClusterSet, ClutserClaim, Service, ServiceExport etc. | ||
It has different responsibilities in member and leader clusters. |
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.
In either a leader or a member cluster, Antrea Multi-cluster Controller is deployed with a Deployment of a single replica, but it takes different responsibilities in member and leader clusters.
docs/multicluster/architecture.md
Outdated
In a leader cluster, Antrea Multi-cluster creates a Deployment that runs Antrea Multi-cluster | ||
Controller which is responsible for converting resources from different member clusters into one | ||
encapsulated resource as long as these resources have the same kind and match Namespace sameness. | ||
In a member cluster, Antrea Multi-cluster creates a Deployment with one replica that runs |
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 we can remove this paragraph, as resource export/import is talked in a later one too.
docs/multicluster/architecture.md
Outdated
|
||
In ClusterSet initialization, Antrea Multi-cluster Controller in a member cluster watches | ||
In a leader cluster, Antrea Multi-cluster creates a Deployment with one replica that runs |
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.
Ditto
docs/multicluster/architecture.md
Outdated
member clusters into one encapsulated resource as long as these resources have the same kind | ||
and match Namespace sameness. | ||
|
||
When ClusterSet is initialized in member cluster, Antrea Multi-cluster Controller watches |
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.
Maybe add a sub-section of "ClusterSet Initialization"
docs/multicluster/architecture.md
Outdated
and writes the ResourceExports to leader cluster. For resource importing, it watches ResourceImports | ||
from leader cluster, and creates multi-cluster Services and Endpoints with a prefix `antrea-mc-` | ||
plus exported Service name, and also ServiceImports which have the same name as the Service name. | ||
For resources exporting in the member cluster, Antrea Multi-cluster Controller watches ServiceExport, |
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.
This section is not well organized. I feel harder to explain all my suggestion than just writing down what is in my mind. Probably let me push a version for you to review.
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.
@luolanzone : I updated a version. Please review.
other member clusters through tunnels. The diagram below depicts Antrea | ||
Mulit-cluster connectivity with Multi-cluster Gateways. | ||
|
||
<img src="assets/mc-gateway.svg" width="800" alt="Antrea Multi-cluster Gateway"> |
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.
Should we use "pod-a/b/c" to be consistent with "node-a1", etc.?
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.
sure, I will update it.
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.
@jianjuns the change looks good to me overall, I changed a few minor descriptions and the line length for Antrea Multi-cluster NetworkPolicy
section as well, you can move forward if you feel it's ready.
Update the Multi-cluster architecture doc with descriptions about Multi-cluster Gateway, and change the diagrams' format from png to svg. Signed-off-by: Lan Luo <[email protected]> Co-authored-by: Jianjun Shen <[email protected]>
docs/multicluster/architecture.md
Outdated
ClusterSet and Clusterclaim CRs, and initializes the ClusterSet. It also validates | ||
the MemberClusterAnnounce CR created by a member cluster and updates the member | ||
cluster status to the ClusterSet. |
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.
Here is the main one I updated, we have a webhook for MemberClusterAnnounce
in leader cluster, so I used validates
here, and admin is the one to add/update member clusters to ClusterSet, Controller will validate and update status only.
/skip-all |
…#3899: Revise Multi-cluster Gateway descriptions in user docs (#3908) * Update Multi-cluster architecture doc Update the Multi-cluster architecture doc with descriptions about Multi-cluster Gateway, and change the diagrams' format from png to svg. Signed-off-by: Lan Luo <[email protected]> Co-authored-by: Jianjun Shen <[email protected]> * Revise Multi-cluster Gateway descriptions in user docs Revise the descriptions about Multi-cluster Gateway configuration and multi-cluster Services. Add descriptions about the `gateway-ip` annotation. Remove unnecessary descriptions about implementations from the user documents. Signed-off-by: Jianjun Shen <[email protected]>
Update MC architecture doc and change old diagrams' format from png to svg.
Signed-off-by: Lan Luo [email protected]