Skip to content

Commit 2c674f5

Browse files
authored
Merge pull request #89983 from jab-rh/OSDOCS-10810-addn-routing
OSDOCS-10810: Add route advertisements
2 parents 60c8198 + 5b72b8c commit 2c674f5

18 files changed

+1106
-0
lines changed

_topic_maps/_topic_map.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1754,6 +1754,17 @@ Topics:
17541754
File: disabling-bgp-routing
17551755
- Name: Migrating FRR-K8s custom resources
17561756
File: migrating-frr-k8s-resources
1757+
- Name: Route advertisements
1758+
Dir: route_advertisements
1759+
Topics:
1760+
- Name: About route advertisements
1761+
File: about-route-advertisements
1762+
- Name: Enabling route advertisements
1763+
File: enabling-route-advertisements
1764+
- Name: Disabling route advertisements
1765+
File: disabling-route-advertisements
1766+
- Name: Example route advertisements setup
1767+
File: example-route-advertisement-setup
17571768
- Name: Using PTP hardware
17581769
Dir: ptp
17591770
Distros: openshift-enterprise,openshift-origin
71.8 KB
Loading
91 KB
Loading

modules/nw-operator-cr.adoc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,14 @@ endif::operator[]
218218
|`object`
219219
|Specify a configuration object for customizing network policy audit logging. If unset, the defaults audit log settings are used.
220220

221+
|`routeAdvertisements`
222+
|`string`
223+
a|Specifies whether to advertise cluster network routes. The default value is `Disabled`.
224+
--
225+
- `Enabled`: Import routes to the cluster network and advertise cluster network routes as configured in `RouteAdvertisements` objects.
226+
- `Disabled`: Do not import routes to the cluster network or advertise cluster network routes.
227+
--
228+
221229
|`gatewayConfig`
222230
|`object`
223231
|Optional: Specify a configuration object for customizing how egress traffic is sent to the node gateway. Valid values are `Shared` and `Local`. The default value is `Shared`. In the default setting, the Open vSwitch (OVS) outputs traffic directly to the node IP interface. In the `Local` setting, it traverses the host network; consequently, it gets applied to the routing table of the host.
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * networking/route_advertisements/disabling-route-advertisements.adoc
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="nw-route-advertisements-disable_{context}"]
7+
= Disabling route advertisements
8+
9+
As a cluster administrator, you can disable additional route advertisements for your cluster.
10+
11+
.Prerequisites
12+
13+
* You have installed the {oc-first}.
14+
* You are logged in to the cluster as a user with the `cluster-admin` role.
15+
* The cluster is installed on compatible infrastructure.
16+
17+
.Procedure
18+
19+
* To disable additional routing support, enter the following command:
20+
+
21+
[source,terminal]
22+
----
23+
$ oc patch network.operator cluster -p '{
24+
"spec": {
25+
"defaultNetwork": {
26+
"ovnKubernetesConfig": {
27+
"routeAdvertisements": "Disabled"
28+
}
29+
}
30+
}
31+
}'
32+
----
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * networking/route_advertisements/enabling-route-advertisements.adoc
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="nw-route-advertisements-enable_{context}"]
7+
= Enabling route advertisements
8+
9+
As a cluster administrator, you can enable additional routing support for your cluster.
10+
11+
.Prerequisites
12+
13+
* You have installed the {oc-first}.
14+
* You are logged in to the cluster as a user with the `cluster-admin` role.
15+
* The cluster is installed on compatible infrastructure.
16+
17+
.Procedure
18+
19+
* To enable a routing provider and additional route advertisements, enter the following command:
20+
+
21+
[source,terminal]
22+
----
23+
$ oc patch Network.operator.openshift.io cluster --type=merge \
24+
-p='{
25+
"spec": {
26+
"additionalRoutingCapabilities": {
27+
"providers": ["FRR"]
28+
},
29+
"defaultNetwork": {
30+
"ovnKubernetesConfig": {
31+
"routeAdvertisements": "Enabled"
32+
}}}}'
33+
----
Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * networking/route_advertisements/about-route-advertisements.adoc
4+
5+
////
6+
Terminology -
7+
Cluster network routes: Both pod network routes and/or EgressIP routes
8+
Pod network routes: Routes to pod IPs
9+
EgressIP routes: Routes to EgressIPs
10+
////
11+
12+
:_mod-docs-content-type: CONCEPT
13+
[id="nw-routeadvertisements-about_{context}"]
14+
= Advertise cluster network routes with Border Gateway Protocol
15+
16+
With route advertisements enabled, the OVN-Kubernetes network plugin supports advertising network routes for the default pod network and cluster user-defined (CUDN) networks to the provider network, including EgressIPs, and importing routes from the provider network to the default pod network and CUDNs. From the provider network, IP addresses advertised from the default pod network and CUDNs can be reached directly.
17+
18+
For example, you can import routes to the default pod network so you no longer need to manually configure routes on each node. Previously, you might have been using local gateway mode (`RoutingViaHost=true`) and manually configuring routes on each node to approximate a similar configuration. With route advertisements you can accomplish this seamlessly and you can use shared gateway mode (`RoutingViaHost=false`) as well.
19+
20+
Route reflectors on the provider network are supported and can reduce the number of BGP connections required to advertise routes on large networks.
21+
22+
If you use EgressIPs with route advertisements enabled, the layer 3 provider network is aware of EgressIP failovers. This allows you to locate cluster nodes that host EgressIPs on different layer 2 segments whereas before only the layer 2 provider network was aware so that required all the egress nodes to be on the same layer 2 segment.
23+
24+
[id="supported-platforms_{context}"]
25+
== Supported platforms
26+
27+
Advertising routes with border gateway protocol (BGP) is supported on the following infrastructure types:
28+
29+
- Bare-metal
30+
//- {vmw-full} on-premise
31+
32+
[id="infrastructure-requirements_{context}"]
33+
== Infrastructure requirements
34+
35+
To use route advertisements, you must have configured BGP for your network infrastructure. Outages or misconfigurations of your network infrastructure might cause disruptions to your cluster network.
36+
37+
[id="compatibility-with-other-networking-features_{context}"]
38+
== Compatibility with other networking features
39+
40+
Route advertisements support the following {product-title} Networking features:
41+
42+
Multiple external gateways (MEG)::
43+
MEG is not supported with this feature.
44+
45+
EgressIPs::
46+
--
47+
Supports the use and advertisement of EgressIPs. The node where an egress IP address resides advertises the EgressIP. An egress IP address must be on the same layer 2 network subnet as the egress node. The following limitations apply:
48+
49+
- Advertising EgressIPs from a user-defined network (CUDN) operating in layer 2 mode are not supported.
50+
- Advertising EgressIPs for a network that has both egress IP addresses assigned to the primary network interface and egress IP addresses assigned to additional network interfaces is impractical. All EgressIPs are advertised on all of the BGP sessions of the selected FRRConfiguration instances, regardless of whether these sessions are established over the same interface that the EgressIP is assigned to or not, potentially leading to unwanted advertisements.
51+
52+
--
53+
54+
Services::
55+
Works with the MetalLB Operator to advertise services to the provider network.
56+
57+
Egress service::
58+
Full support.
59+
60+
Egress firewall::
61+
Full support.
62+
63+
Egress QoS::
64+
Full support.
65+
66+
Network policies::
67+
Full support.
68+
69+
Direct pod ingress::
70+
Full support for the default cluster network and cluster user-defined (CUDN) networks.
71+
72+
[id="considerations-for-use-with-the-metallb-operator_{context}"]
73+
== Considerations for use with the MetalLB Operator
74+
75+
The MetalLB Operator is installed as an add-on to the cluster. Deployment of the MetalLB Operator automatically enables FRR-K8s as an additional routing capability provider. This feature and the MetalLB Operator use the same FRR-K8s deployment.
76+
77+
[id="considerations-for-naming-cluster-user-defined-networks_{context}"]
78+
== Considerations for naming cluster user-defined networks (CUDNs)
79+
80+
When referencing a VRF device in a `FRRConfiguration` CR, the VRF name is the same as the CUDN name for VRF names that are less than or equal to 15 characters. It is recommended to use a VRF name no longer than 15 characters so that the VRF name can be inferred from the CUDN name.
81+
82+
[id="bgp-routing-custom-resources_{context}"]
83+
== BGP routing custom resources
84+
85+
The following custom resources (CRs) are used to configure route advertisements with BGP:
86+
87+
`RouteAdvertisements`::
88+
This CR defines the advertisements for the BGP routing. From this CR, the OVN-Kubernetes controller generates a `FRRConfiguration` object that configures the FRR daemon to advertise cluster network routes. This CR is cluster scoped.
89+
90+
`FRRConfiguration`::
91+
This CR is used to define BGP peers and to configure route imports from the provider network into the cluster network. Before applying `RouteAdvertisements` objects, at least one FRRConfiguration object must be initially defined to configure the BGP peers. This CR is namespaced.
92+
93+
[id="ovn-kubernetes-controller-generation-of-frrconfiguration-objects_{context}"]
94+
== OVN-Kubernetes controller generation of `FRRConfiguration` objects
95+
96+
An `FRRConfiguration` object is generated for each network and node selected by a `RouteAdvertisements` CR with the appropriate advertised prefixes that apply to each node. The OVN-Kubernetes controller checks whether the `RouteAdvertisements`-CR-selected nodes are a subset of the nodes that are selected by the `RouteAdvertisements`-CR-selected FRR configurations.
97+
98+
Any filtering or selection of prefixes to receive are not considered in `FRRConfiguration` objects that are generated from the `RouteAdvertisement` CRs. Configure any prefixes to receive on other `FRRConfiguration` objects. OVN-Kubernetes imports routes from the VRF into the appropriate network.
99+
100+
[id="cluster-network-operator_{context}"]
101+
== Cluster Network Operator configuration
102+
103+
The Cluster Network Operator (CNO) API exposes several fields to configure route advertisements:
104+
105+
- `spec.additionalRoutingCapabilities.providers`: Specifies an additional routing provider, which is required to advertise routes. The only supported value is `FRR`, which enables deployment of the FRR-K8S daemon for the cluster. When enabled, the FRR-K8S daemon is deployed on all nodes.
106+
- `spec.defaultNetwork.ovnKubernetesConfig.routeAdvertisements`: Enables route advertisements for the default cluster network and CUDN networks. The `spec.additionalRoutingCapabilities` field must be set to `FRR` to enable this feature.

0 commit comments

Comments
 (0)