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 document for Service of type LoadBalancer #3322

Merged
merged 1 commit into from
Feb 24, 2022

Conversation

hty690
Copy link
Contributor

@hty690 hty690 commented Feb 16, 2022

Signed-off-by: Tianyi Huang hty690@126.com

Closes #2020

@codecov-commenter
Copy link

codecov-commenter commented Feb 16, 2022

Codecov Report

Merging #3322 (8f91781) into main (15de4cf) will decrease coverage by 19.11%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##             main    #3322       +/-   ##
===========================================
- Coverage   60.95%   41.83%   -19.12%     
===========================================
  Files         266      201       -65     
  Lines       26508    24142     -2366     
===========================================
- Hits        16159    10101     -6058     
- Misses       8597    12991     +4394     
+ Partials     1752     1050      -702     
Flag Coverage Δ
kind-e2e-tests ?
unit-tests 41.83% <ø> (+0.20%) ⬆️

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

Impacted Files Coverage Δ
pkg/ovs/openflow/default.go 0.00% <0.00%> (-100.00%) ⬇️
pkg/util/runtime/runtime.go 0.00% <0.00%> (-100.00%) ⬇️
pkg/agent/nodeportlocal/k8s/annotations.go 0.00% <0.00%> (-100.00%) ⬇️
pkg/ovs/openflow/logs.go 9.52% <0.00%> (-90.48%) ⬇️
pkg/apis/controlplane/register.go 0.00% <0.00%> (-90.00%) ⬇️
pkg/agent/controller/networkpolicy/reject.go 0.00% <0.00%> (-87.91%) ⬇️
pkg/agent/client.go 0.00% <0.00%> (-77.42%) ⬇️
pkg/ovs/ovsconfig/ovs_client_linux.go 0.00% <0.00%> (-76.93%) ⬇️
pkg/flowaggregator/certificate.go 0.00% <0.00%> (-76.58%) ⬇️
...agent/controller/traceflow/traceflow_controller.go 0.00% <0.00%> (-73.41%) ⬇️
... and 184 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.

Thanks for working on this!

docs/service-loadbalancer.md Outdated Show resolved Hide resolved
@jianjuns jianjuns added the kind/documentation Categorizes issue or PR as related to a documentation. label Feb 17, 2022
Copy link
Contributor

@antoninbas antoninbas left a comment

Choose a reason for hiding this comment

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

We should add a link to this document to https://github.com/antrea-io/antrea/blob/main/docs/feature-gates.md#serviceexternalip, like we did for other features.

docs/service-loadbalancer.md Outdated Show resolved Hide resolved
docs/service-loadbalancer.md Outdated Show resolved Hide resolved
docs/service-loadbalancer.md Outdated Show resolved Hide resolved
docs/service-loadbalancer.md Outdated Show resolved Hide resolved
docs/service-loadbalancer.md Outdated Show resolved Hide resolved
docs/service-loadbalancer.md Outdated Show resolved Hide resolved
docs/service-loadbalancer.md Show resolved Hide resolved
docs/service-loadbalancer.md Outdated Show resolved Hide resolved
docs/service-loadbalancer.md Outdated Show resolved Hide resolved
docs/service-loadbalancer.md Outdated Show resolved Hide resolved
docs/service-loadbalancer.md Show resolved Hide resolved
docs/service-loadbalancer.md Outdated Show resolved Hide resolved
docs/service-loadbalancer.md Show resolved Hide resolved
docs/service-loadbalancer.md Outdated Show resolved Hide resolved
@hty690 hty690 force-pushed the service_lb_doc branch 2 times, most recently from 2693a7f to d3f2990 Compare February 18, 2022 07:54
docs/service-loadbalancer.md Outdated Show resolved Hide resolved
docs/service-loadbalancer.md Outdated Show resolved Hide resolved
@hty690 hty690 force-pushed the service_lb_doc branch 2 times, most recently from 0e51287 to a238e46 Compare February 18, 2022 08:19
@hty690
Copy link
Contributor Author

hty690 commented Feb 18, 2022

Thanks for the review. I have addressed most of the comments. Please take another look.

Copy link
Member

@tnqn tnqn left a comment

Choose a reason for hiding this comment

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

LGTM overall

docs/service-loadbalancer.md Outdated Show resolved Hide resolved
docs/service-loadbalancer.md Show resolved Hide resolved
Node network. The simplest way to achieve this is to reserve a range of IPs
from the Node network subnet, and define Service ExternalIPPools with the
reserved IPs, when the Nodes are connected to a layer 2 subnet. Or, another
possible way might be to manually configure Node network routing (e.g. by
Copy link
Member

Choose a reason for hiding this comment

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

might be => is?

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 way is not very convenient, even theoretically work. So, "might be" should be good.

@hty690 hty690 force-pushed the service_lb_doc branch 4 times, most recently from 0c0e740 to aa6fbb4 Compare February 21, 2022 03:25
jianjuns
jianjuns previously approved these changes Feb 21, 2022
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.

LGTM

antoninbas
antoninbas previously approved these changes Feb 22, 2022
Copy link
Contributor

@antoninbas antoninbas left a comment

Choose a reason for hiding this comment

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

a couple nits, LGTM

configures the cloud load balancers for the Services. However, the load
balancer support is not available on all platforms, or in some cases, it is
complex or has extra cost to deploy external load balancers. This document
describes two options of supporting Services of type LoadBalancer with Antrea,
Copy link
Contributor

Choose a reason for hiding this comment

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

s/of supporting/for supporting

#### Create an ExternalIPPool custom resource

Service external IPs are allocated from an ExternalIPPool, which defines a pool
of external IPs and the set of nodes to which the external IPs can be assigned.
Copy link
Contributor

Choose a reason for hiding this comment

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

s/nodes/Nodes for consistency

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok

Comment on lines 106 to 108
For Antrea to manage the externalIP for a Service of type LoadBalancer, the
Service should be created with the `service.antrea.io/external-ip-pool`
annotation. For example:
Copy link
Contributor

Choose a reason for hiding this comment

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

does it work if the Service is created first without the annotation and then updated to include the correct annotation?

if yes, maybe rephrase to: ..., the Service should be annotated with service.antrea.io/external-ip-pool.

Copy link
Contributor Author

@hty690 hty690 Feb 23, 2022

Choose a reason for hiding this comment

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

updated.


The BGP mode of MetalLB requires more configuration parameters to establish BGP
peering to the router. The example below configures MetalLB using AS number
64500 to peer router 10.0.0.1 with AS number 64501:
Copy link
Contributor

Choose a reason for hiding this comment

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

should it be "to peer with router"?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

how about "connected to peer router"?

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe: "connect to peer router"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok. thanks.

@hty690 hty690 dismissed stale reviews from antoninbas and jianjuns via a45860d February 23, 2022 02:13
- [Create a Service of type LoadBalancer](#create-a-service-of-type-loadbalancer)
- [Validate Service external IP](#validate-service-external-ip)
- [Limitations](#limitations)
- [Using MetalLB with Antrea](#using-metalb-with-antrea)
Copy link
Contributor

Choose a reason for hiding this comment

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

Missed a 'l' in "metallb" in "using-metalb-with-antrea"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added. thanks!

Signed-off-by: Tianyi Huang <hty690@126.com>
@jianjuns
Copy link
Contributor

jianjuns commented Feb 24, 2022

/skip-all
Document change only.

@jianjuns jianjuns merged commit f5e3e54 into antrea-io:main Feb 24, 2022
bangqipropel pushed a commit to bangqipropel/antrea that referenced this pull request Mar 2, 2022
Signed-off-by: Tianyi Huang <hty690@126.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/documentation Categorizes issue or PR as related to a documentation.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Document Antrea deployment guide with MetalLB
7 participants