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

Update multi-cluster user guide and templates #3853

Merged
merged 1 commit into from Jun 8, 2022

Conversation

luolanzone
Copy link
Contributor

@luolanzone luolanzone commented Jun 1, 2022

Add a quick start guide.
Update the user guide with Multi-cluster Gateway.

Signed-off-by: Lan Luo luola@vmware.com
Signed-off-by: Jianjun Shen shenj@vmware.com

@luolanzone luolanzone requested a review from jianjuns June 1, 2022 14:12
@codecov-commenter
Copy link

codecov-commenter commented Jun 1, 2022

Codecov Report

Merging #3853 (97aca3f) into main (87918f6) will increase coverage by 0.08%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3853      +/-   ##
==========================================
+ Coverage   64.33%   64.42%   +0.08%     
==========================================
  Files         290      288       -2     
  Lines       41225    41252      +27     
==========================================
+ Hits        26524    26575      +51     
+ Misses      12578    12548      -30     
- Partials     2123     2129       +6     
Flag Coverage Δ
kind-e2e-tests 51.77% <ø> (+0.11%) ⬆️
unit-tests 44.32% <ø> (+0.06%) ⬆️

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

Impacted Files Coverage Δ
pkg/agent/ipassigner/ip_assigner_linux.go 47.28% <0.00%> (-11.85%) ⬇️
pkg/version/version.go 42.85% <0.00%> (-9.53%) ⬇️
pkg/controller/networkpolicy/store/addressgroup.go 87.20% <0.00%> (-3.49%) ⬇️
pkg/agent/openflow/client.go 67.87% <0.00%> (-1.51%) ⬇️
pkg/controller/serviceexternalip/controller.go 68.67% <0.00%> (-1.21%) ⬇️
...ntroller/networkpolicy/networkpolicy_controller.go 70.17% <0.00%> (-0.66%) ⬇️
pkg/controller/networkpolicy/status_controller.go 71.37% <0.00%> (-0.41%) ⬇️
pkg/agent/controller/egress/egress_controller.go 73.93% <0.00%> (-0.35%) ⬇️
pkg/agent/agent.go 53.80% <0.00%> (-0.26%) ⬇️
pkg/ovs/openflow/ofctrl_bridge.go 56.86% <0.00%> (-0.20%) ⬇️
... and 15 more

@jianjuns jianjuns changed the title Update MC user guide and templates Update multi-cluster user guide and templates Jun 1, 2022
@@ -1,15 +1,15 @@
apiVersion: multicluster.crd.antrea.io/v1alpha1
kind: ClusterClaim
metadata:
name: leadercluster-id
Copy link
Contributor

Choose a reason for hiding this comment

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

Could we change to clusterSet.k8s.io as we talked?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, I will change this one today.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed it to clusterset.k8s.io due to upper case is not allowed in metadata's name.

@jianjuns jianjuns force-pushed the mc-user-guide branch 3 times, most recently from 18b8999 to 3ab0d4f Compare June 2, 2022 00:16
@jianjuns
Copy link
Contributor

jianjuns commented Jun 2, 2022

@luolanzone : I updated the quick-start doc. The biggest change is that it now talks about two clusters, with one to be both leader and member. Could you check? I plan to revise the user guide too.


In this quick start guide, we will set up a Antrea Multi-cluster ClusterSet with
two clusters. One cluster will serve as both the leader and a member cluster,
while another cluster will be a member only. The diagram belows shows the two
Copy link
Contributor

Choose a reason for hiding this comment

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

@luolanzone : I feel we better to have a simple diagram to show the two clusters (with cluster ID), and ClusterSet (with leader and member cluster information).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, I haven't had the chance to draw the diagram yesterday, I will add it.

Copy link
Contributor

@jianjuns jianjuns Jun 2, 2022

Choose a reason for hiding this comment

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

A few comments for the diagram:

  1. What you think we have a box for the ClusterSet that contains the two clusters? We can add ClusterSet ID there.
  2. Add something like "leader" to the leader mc-controller to indicate it is the controller for leader.
  3. And some way to indicate the Gateway Node too.
  4. Could we add apiserver IP to Cluster A
  5. Could we indicate Cluster A is "leader and member", and Cluster B is "member"
  6. We should change the Node names in the diagram and commands (e.g. node-a1/a2 and node-b1/b2)

```

## Multi-cluster Gateway Configuration
Copy link
Contributor

Choose a reason for hiding this comment

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

I moved it here to be before the feature consumption sections. But have not review and update the section yet.

@@ -503,6 +591,17 @@ Events:
Warning ACNPImportFailed 2m11s resourceimport-controller ACNP Tier random does not exist in the importing cluster test-cluster-west
```

## Build Antrea Multi-cluster Image
Copy link
Contributor

Choose a reason for hiding this comment

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

This is not really for users. But anyway, I moved it to the end of the doc.

cluster, one in leader mode and another in member mode. There is no deployment
dependency between member and leader clusters when you have a dedicated leader
cluster. But to run both leader and member controllers in one cluster, you need
to follow the deployment sequence below:
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it still true? @luolanzone

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 think there is no dependency even the cluster run both leader and member if user is using 'kubectl apply', but if user is using kubectl create -f, CRD installation will fail since some of them are already existing like ClusterClaim.

Copy link
Contributor

Choose a reason for hiding this comment

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

If it is true, we should remove the words around ordering.

- clusterID: test-cluster-east
namespace: antrea-mcs-ns
- clusterID: test-cluster-leader
- clusterID: test-cluster-member
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@hjiajing Could you help to review these changes in templates? I hope it has minor impact to CI, thanks.

Copy link
Contributor

Choose a reason for hiding this comment

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

@luolanzone : please update the ObjectMeta.Name first.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sure, I am working the diagram, will submit a new commit once is done.

@luolanzone luolanzone added the area/multi-cluster Issues or PRs related to multi cluster. label Jun 2, 2022
@luolanzone luolanzone force-pushed the mc-user-guide branch 2 times, most recently from 50352f7 to 82d7a67 Compare June 2, 2022 07:47
Copy link
Contributor

@jianjuns jianjuns left a comment

Choose a reason for hiding this comment

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

Re-paste my comments for the diagram:

  1. What you think we have a box for the ClusterSet that contains the two clusters? We can add ClusterSet ID there.
  2. Add something like "leader" to the leader mc-controller to indicate it is the controller for leader.
  3. And some way to indicate the Gateway Node too.
  4. Could we add apiserver IP to Cluster A
  5. Could we indicate Cluster A is "leader and member", and Cluster B is "member"
  6. We should change the Node names in the diagram and commands (e.g. node-a1/a2 and node-b1/b2)


```bash
$kubectl apply -f https://github.com/antrea-io/antrea/releases/download/$TAG/antrea-multicluster-member.yml
$kubectl apply -f https://github.com/antrea-io/antrea/releases/download/$TAG/antrea-multicluster-leader-global.yml
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to apply antrea-multicluster-leader-global.yml for a dual-role cluster? In the user guide, earlier you wrote it is necessary, as antrea-multicluster-member.yml already import all CRDs.

If we do need to apply all YAMLs and the order does not matter, I would apply leader YAMLs first, which is easier to understand. @luolanzone

Copy link
Contributor Author

@luolanzone luolanzone Jun 4, 2022

Choose a reason for hiding this comment

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

yes, we removed those unnecessary CRDs which was both in leader and member yamls, so we need to apply antrea-multicluster-leader-global.yml for a dual-role cluster, I will move it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done, the diagram is also updated.


```bash
$kubectl apply -f https://github.com/antrea-io/antrea/releases/download/$TAG/antrea-multicluster-leader-global.yml
$kubectl apply -f https://github.com/antrea-io/antrea/releases/download/$TAG/antrea-multicluster-member.yml
Copy link
Contributor

Choose a reason for hiding this comment

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

I noticed you added this line in your last update, but antrea-multicluster-member.yml is already applied in line 60. Should we remove this line?

Copy link
Contributor

Choose a reason for hiding this comment

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

I also revised the diagram a little. Check.

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 removed the extra step to apply member manifest. The revised diagram looks good to me, but I changed the background to white so it can show in browser's dark mode clearly.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok.

@jianjuns jianjuns force-pushed the mc-user-guide branch 4 times, most recently from 7850531 to 2c2813e Compare June 5, 2022 22:43
$sed 's/changeme/antrea-multicluster/g' antrea-multicluster-leader-namespaced.yml | kubectl apply -f -
$kubectl apply -f https://github.com/antrea-io/antrea/releases/download/$TAG/antrea-multicluster-member.yml
```

Copy link
Contributor

@jianjuns jianjuns Jun 6, 2022

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 add a command to check the deployment results that can show both leader & member mc-controller Deployments and Pods.

Does something like work: kc get all -A -l="app=xyz"

What should be the "xyz".

@luolanzone

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sure, I will add it, it can be kubectl get all -A -l="component=antrea-mc-controller", should I add a sample output?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, better to have a sample output.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@hjiajing
Copy link
Contributor

hjiajing commented Jun 6, 2022

@luolanzone Hi Lan. I changed multiclusterv1alpha1.WellKnownClusterClaimClusterSet from clusterSet.k8s.io to clusterset.k8s.io. I don't know if this change will affect you in this PR. Just a reminder.

@luolanzone
Copy link
Contributor Author

@hjiajing , I will check, thanks for the reminder, please make sure e2e is passed after you change the ID.

Add a quick start guide.
Update the user guide with Multi-cluster Gateway.

Signed-off-by: Lan Luo <luola@vmware.com>
Co-authored-by: Jianjun Shen <shenj@vmware.com>
@luolanzone
Copy link
Contributor Author

luolanzone commented Jun 7, 2022

Hi @jianjuns I also changed the WellKnownClusterClaimClusterSet from "clusterSet.k8s.io"` "clusterset.k8s.io" in this PR and all other related strings, maybe do a rebase later if @hjiajing 's antctl bootstrap is merged first. and I changed your sign-off info to co-author in the commit, otherwise, there will be no extra co-author information.

@luolanzone luolanzone added this to the Antrea v1.7 release milestone Jun 7, 2022
@jianjuns
Copy link
Contributor

jianjuns commented Jun 8, 2022

/skip-all

@jianjuns jianjuns merged commit 62a0145 into antrea-io:main Jun 8, 2022
@luolanzone luolanzone deleted the mc-user-guide branch July 14, 2022 09:31
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants