Skip to content

Commit

Permalink
bgpv1: Add the documentation for using serviceAdvertisements
Browse files Browse the repository at this point in the history
Ideally, the internalTrafficPolicy and externalTrafficPolicy fields are independent. However, since we advertise the ClusterIP to the external world via BGP, it has caused some confusion regarding the meanings of external and internal. Therefore, we need to provide some clarification in the documentation.

For ClusterIP: Only consider the iTP configuration for advertisement, and ignore the eTP configuration.
For ExternalIP and LBIP: Only consider the eTP configuration for advertisement, and ignore the iTP configuration.

Signed-off-by: chaunceyjiang <chaunceyjiang@gmail.com>
  • Loading branch information
chaunceyjiang authored and julianwiedmann committed Mar 25, 2024
1 parent 31ddad2 commit 33dfaa1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Documentation/network/bgp-control-plane.rst
Original file line number Diff line number Diff line change
Expand Up @@ -305,10 +305,15 @@ defaults to the ``LoadBalancerIP`` service. You can also specify the ``.serviceA
field to advertise specific service types, with options such as ``LoadBalancerIP``,
``ClusterIP`` and ``ExternalIP``.

It is worth noting that when you configure ``virtualRouters[*].serviceAdvertisements`` as ``ClusterIP``,
the BGP Control Plane only considers the configuration of the service's ``.spec.internalTrafficPolicy`` and ignores
the configuration of ``.spec.externalTrafficPolicy``.
For ``ExternalIP`` and ``LoadBalancerIP``, it only considers the configuration of
the service's ``.spec.externalTrafficPolicy`` and ignores the configuration of ``.spec.internalTrafficPolicy``.

The ``.serviceSelector`` field is a label selector that selects Services matching
the specified ``.matchLabels`` or ``.matchExpressions``.


When your upstream router supports Equal Cost Multi Path(ECMP), you can use
this feature to load balance traffic to the Service across multiple nodes by
advertising the same ingress IPs from multiple nodes.
Expand Down

0 comments on commit 33dfaa1

Please sign in to comment.