Skip to content
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

Revise Multi-cluster Gateway descriptions in user docs #3899

Merged
merged 1 commit into from
Jun 16, 2022

Conversation

jianjuns
Copy link
Contributor

Revise the descriptions about Multi-cluster Gateway configuration.
Add descriptions about the gateway-ip annotation.
Remove unnecessary descriptions about implementations from the user
documents.

Signed-off-by: Jianjun Shen [email protected]

@jianjuns jianjuns added kind/documentation Categorizes issue or PR as related to a documentation. area/multi-cluster Issues or PRs related to multi cluster. labels Jun 15, 2022
@jianjuns jianjuns requested a review from luolanzone June 15, 2022 05:21
luolanzone
luolanzone previously approved these changes Jun 15, 2022
Copy link
Contributor

@luolanzone luolanzone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, two nits:

its Multi-cluster Gateway. Multi-cluster Service traffic are routed among clusters
through the tunnels between Gateways.


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extra empty line?

there are several possibilities:

* By default, the K8s Node's `InternalIP` is used as `gatewayIP` too.
* You can choose to use the K8ds Node's `ExternalIP` as `gatewayIP`, by changing
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* You can choose to use the K8ds Node's `ExternalIP` as `gatewayIP`, by changing
* You can choose to use the K8s Node's `ExternalIP` as `gatewayIP`, by changing

Gateways.
remote Gateways of other member clusters. Multi-cluster Controller discovers the
IP addresses from the K8s Node resource of the Gateway Node. It will always use
use `InternalIP` of the K8s Node as the Gateway's `internalIP`. For `gatewayIP`,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

extra use

@codecov-commenter
Copy link

codecov-commenter commented Jun 15, 2022

Codecov Report

Merging #3899 (02c0bf6) into main (59fc30a) will increase coverage by 0.01%.
The diff coverage is n/a.

❗ Current head 02c0bf6 differs from pull request most recent head 3ff19be. Consider uploading reports for the commit 3ff19be to get more accurate results

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3899      +/-   ##
==========================================
+ Coverage   35.16%   35.18%   +0.01%     
==========================================
  Files         122      122              
  Lines       17123    17123              
==========================================
+ Hits         6022     6024       +2     
+ Misses      10602    10601       -1     
+ Partials      499      498       -1     
Flag Coverage Δ
integration-tests 35.18% <ø> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
antrea/pkg/ovs/openflow/ofctrl_bridge.go 69.41% <0.00%> (+0.39%) ⬆️

luolanzone
luolanzone previously approved these changes Jun 15, 2022
@jianjuns
Copy link
Contributor Author

@luolanzone : I made a few more revisions, and added description about encap mode and tunnel type.

luolanzone
luolanzone previously approved these changes Jun 16, 2022
Copy link
Contributor

@luolanzone luolanzone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, two nits:

docs/multicluster/user-guide.md Show resolved Hide resolved
exported network information. For example, in cluster `test-cluster-west`, you
you can see a `ClusterInfoImport` CR with name `test-cluster-east-clusterinfo`
is created for cluster `test-cluster-east`. You can check the
`ClusterInfoImport` with command: `kubectl get clusterinfoimport -o yaml`,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
`ClusterInfoImport` with command: `kubectl get clusterinfoimport -o yaml`,
`ClusterInfoImport` with command: `kubectl get clusterinfoimport test-cluster-east-clusterinfo -o yaml`,

Copy link
Contributor Author

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 specify name here. Anyway readers can understand they can add name if they want. In most cases, they will not, to list all clusters.

the ClusterNetworkPolicy spec they wish to be replicated. The ResourceExport should be created in the
Namespace which implements the Common Area of the ClusterSet. In future releases, some additional tooling
may become available to automate the creation of such ResourceExport and make ACNP replication easier.
To achieve such ACNP replication across clusters, admins can, in the acting
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed this section to remove "Common Area" as it is never mentioned in this doc.

in leader cluster will create two `ResourceImport` contains all exported Service and
Endpoints'. you can check the created resources in the leader cluster which should be
like below:
For example, once you export the `default/nginx` Service in member cluster
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revised this section to remove "Multi-cluster Controller", etc. and some internal behaviors, as no need to talk about design in user guide.

Service from `test-cluster-east` will be routed to the backend `nginx` Pods in
`test-cluster-west` through the Multi-cluster Gateways.

As part of the Service export/import process, in the leader cluster, two
Copy link
Contributor Author

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 talk about this internal logic in user doc, but anyway we can keep it.

Then you can go to the member cluster `test-cluster-east` to check the new created
Service and Endpoints with name `kube-system/antrea-mc-nginx` and a ServiceImport named
`kube-system/nginx`. If there is already an existing Service created by users in the
member cluster `test-cluster-east` also named `nginx` in Namespace `kube-system`, which
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean a Service with name antrea-mc-nginx? It is rather uncommon. Guess no need to mention that.

For example, once you export the `default/nginx` Service in member cluster
`test-cluster-west`, it will be exported to member cluster `test-cluster-east`
through the leader cluster. A Service and an Endpoints with name
`default/antrea-mc-nginx` will be created in `test-cluster-east`, as well as
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed Namespace to "default", as not common to create Services in kube-system. Could you check?

multi-cluster Service resources will be updated accordingly. A few cases below
are worth to note:

1. When there are more than one ServiceExports created for a single Service, the
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am trying to revise the description (as hard to understand the previous version). Could you check?

@jianjuns jianjuns force-pushed the multicluster-doc branch 4 times, most recently from 19267b0 to 3516019 Compare June 16, 2022 03:06
like below:
For example, once you export the `default/nginx` Service in member cluster
`test-cluster-west`, it will be exported to member cluster `test-cluster-east`
through the leader cluster. A Service and an Endpoints with name
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
through the leader cluster. A Service and an Endpoints with name
through the leader cluster. A Service and an Endpoint with name

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The resource kind is indeed Endpoints.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, we can keep it, I am actually confused with this one since I saw both an Endpoints and an Endpoint in our docs and comments.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I already removed all "Endpoint" or changed to "endpoint".

docs/multicluster/user-guide.md Show resolved Hide resolved
docs/multicluster/user-guide.md Show resolved Hide resolved
Service resources will be updated accordingly. The two cases below are worth to
note:

1. When there are more than one ServiceExports created for a single Service, the
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
1. When there are more than one ServiceExports created for a single Service, the
1. When there are more than one ServiceExports from different member clusters created for a single Service, the


1. When there are more than one ServiceExports created for a single Service, the
Service might not be exported correctly, and updates to the Service will not
be handled, until users remove the redundant ServiceExports.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
be handled, until users remove the redundant ServiceExports.
be handled, until users remove the redundant ServiceExports or correct the Service to make its definition consistent in each member cluster.

creation of ResourceExports for ACNPs, and provide a user-friendly way to define
Multi-cluster NetworkPolicies to be enforced in the ClusterSet.

replication easier.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Forgot to remove?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Fixed

Revise the descriptions about Multi-cluster Gateway configuration.
Add descriptions about the `gateway-ip` annotation.
Remove unnecessary descriptions about implementations from the user
documents.

Signed-off-by: Jianjun Shen <[email protected]>
Copy link
Contributor

@luolanzone luolanzone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jianjuns
Copy link
Contributor Author

/skip-all

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/multi-cluster Issues or PRs related to multi cluster. kind/documentation Categorizes issue or PR as related to a documentation.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants