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

Add Gateway and ClusterInfoImport CRDs #3689

Merged
merged 1 commit into from
Apr 27, 2022
Merged

Conversation

luolanzone
Copy link
Contributor

  • Add Gateway and ClusterInfoImport CRDs and update corresponding manifests
    • A sample of Gateway is like below:
    apiVersion: multicluster.crd.antrea.io/v1alpha1
    kind: Gateway
    metadata:
      name: k8s-node-1
      namespace: kube-system
    gatewayIP: 172.16.27.224
    internalIP: 172.16.27.224
    • A sample of ClusterInfoImport is like below:
    apiVersion: multicluster.crd.antrea.io/v1alpha1
    kind: ClusterInfoImport
    metadata:
      name: test-cluster-west-kube-system-clusterinfo
      namespace: kube-system
    spec:
      clusterID: test-cluster-west
      gatewayNodeInfos:
      - gatewayIP: 10.10.10.10
        name: k8s-node-1
      serviceCIDR: 10.19.0.0/18
  • Two new fields 'ServiceCIDR' and 'GatewayIPPrecedence' are added in MultiClusterConfig.
    • By default, MC controller will detect ClusterIP range automatically. If admin set the
      ServiceCIDR config manually, MC controller will use the value in the config.
    • By default, MC controller will chose InternalIP of a Node as the GatewayIP, if admin set
      GatewayIPPrecedence config as 'public', it will use ExternalIP as the GatewayIP.

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

@luolanzone luolanzone requested review from jianjuns and Dyanngg April 27, 2022 02:25
@luolanzone luolanzone added the area/multi-cluster Issues or PRs related to multi cluster. label Apr 27, 2022
@codecov-commenter
Copy link

codecov-commenter commented Apr 27, 2022

Codecov Report

Merging #3689 (65c8980) into main (70bbcb8) will decrease coverage by 7.18%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3689      +/-   ##
==========================================
- Coverage   64.33%   57.15%   -7.19%     
==========================================
  Files         281      392     +111     
  Lines       39771    55082   +15311     
==========================================
+ Hits        25588    31482    +5894     
- Misses      12196    21140    +8944     
- Partials     1987     2460     +473     
Flag Coverage Δ
integration-tests 38.27% <ø> (?)
kind-e2e-tests 52.26% <ø> (+0.03%) ⬆️
unit-tests 43.82% <ø> (+0.07%) ⬆️

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

Impacted Files Coverage Δ
...agent/flowexporter/connections/deny_connections.go 83.90% <0.00%> (-5.75%) ⬇️
pkg/ovs/openflow/ofctrl_nxfields.go 65.51% <0.00%> (-3.45%) ⬇️
pkg/agent/flowexporter/exporter/exporter.go 70.79% <0.00%> (-0.50%) ⬇️
...g/agent/cniserver/interface_configuration_linux.go 16.74% <0.00%> (-0.50%) ⬇️
pkg/agent/cniserver/pod_configuration.go 53.75% <0.00%> (-0.29%) ⬇️
pkg/agent/openflow/pipeline.go 74.90% <0.00%> (-0.02%) ⬇️
.../multicluster/mock_membercluster_status_manager.go
...ster/commonarea/mock_remote_common_area_manager.go
...multicluster/commonarea/mock_remote_common_area.go
antrea/pkg/agent/openflow/groups.go 0.00% <0.00%> (ø)
... and 119 more

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.

Just a few nits.

* Add Gateway and ClusterInfoImport CRDs and update corresponding manifests
    - A sample of Gateway is like below:
    ```yaml
    apiVersion: multicluster.crd.antrea.io/v1alpha1
    kind: Gateway
    metadata:
      name: k8s-node-1
      namespace: kube-system
    gatewayIP: 172.16.27.224
    internalIP: 172.16.27.224
    ```
    - A sample of ClusterInfoImport is like below:
    ```yaml
    apiVersion: multicluster.crd.antrea.io/v1alpha1
    kind: ClusterInfoImport
    metadata:
      name: test-cluster-west-kube-system-clusterinfo
      namespace: kube-system
    spec:
      clusterID: test-cluster-west
      gatewayNodeInfos:
      - gatewayIP: 10.10.10.10
        name: k8s-node-1
      serviceCIDR: 10.19.0.0/18
    ```
* Two new fields 'ServiceCIDR' and 'GatewayIPPrecedence' are added in MultiClusterConfig.
    - By default, MC controller will detect ClusterIP range automatically. If admin set the
    ServiceCIDR config manually, MC controller will use the value in the config.
    - By default, MC controller will chose InternalIP of a Node as the GatewayIP, if admin set
    GatewayIPPrecedence config as 'public', it will use ExternalIP as the GatewayIP.

Signed-off-by: Lan Luo <luola@vmware.com>
@luolanzone
Copy link
Contributor Author

/test-multicluster-e2e

@tnqn
Copy link
Member

tnqn commented Apr 27, 2022

/skip-all

@tnqn tnqn merged commit 2023829 into antrea-io:main Apr 27, 2022
@luolanzone luolanzone added this to the Antrea v1.7 release milestone Apr 28, 2022
@luolanzone luolanzone deleted the new-mc-apis branch May 24, 2022 06:10
@luolanzone luolanzone mentioned this pull request Jun 15, 2022
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.

4 participants