Skip to content

Commit 611c4ca

Browse files
committed
OSDOCS-10810: Add BGP routing
- https://issues.redhat.com/browse/OSDOCS-10810 Includes BGP only.
1 parent 6e028b5 commit 611c4ca

14 files changed

+261
-0
lines changed

_topic_maps/_topic_map.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1721,6 +1721,17 @@ Topics:
17211721
File: metallb-troubleshoot-support
17221722
- Name: Associating secondary interfaces metrics to network attachments
17231723
File: associating-secondary-interfaces-metrics-to-network-attachments
1724+
- Name: BGP routing
1725+
Dir: bgp_routing
1726+
Topics:
1727+
- Name: About BGP routing
1728+
File: about-bgp-routing
1729+
- Name: Enabling BGP routing
1730+
File: enabling-bgp-routing
1731+
- Name: Disabling BGP routing
1732+
File: disabling-bgp-routing
1733+
- Name: Migrating FRR-K8s custom resources
1734+
File: migrating-frr-k8s-resources
17241735
---
17251736
Name: Storage
17261737
Dir: storage

modules/nw-bgp-about.adoc

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * networking/bgp_routing/about-bgp-routing.adoc
4+
5+
:_mod-docs-content-type: CONCEPT
6+
[id="nw-bgp-about_routing_{context}"]
7+
= About Border Gateway Protocol (BGP) routing
8+
9+
{product-title} supports BGP routing through FRRouting (FRR), a free, open source internet routing protocol suite for Linux, UNIX, and similar operating systems. FRR-K8s is a Kubernetes-based daemon set that exposes a subset of the FRR API in a Kubernetes-compliant manner. As a cluster administrator, you can use the `FRRConfiguration` custom resource (CR) to access FRR services.
10+
11+
[id="supported-platforms_{context}"]
12+
== Supported platforms
13+
14+
BGP routing is supported on the following infrastructure types:
15+
16+
- Bare metal
17+
- {vmw-full} on-premise
18+
19+
BGP routing requires that you have properly configured BGP for your network provider. Outages or misconfigurations of your network provider might cause disruptions to your cluster network.
20+
21+
[id="considerations-for-use-with-the-metallb-operator_{context}"]
22+
== Considerations for use with the MetalLB Operator
23+
24+
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 and uses the FRR-K8s daemon installed by this feature.
25+
26+
Before upgrading to 4.18, any existing `FRRConfiguration` in the `metallb-system` namespace not managed by the MetalLB operator (added by a cluster administrator or any other component) needs to be copied to the `openshift-frr-k8s` namespace manually, creating the namespace if necessary.
27+
28+
[IMPORTANT]
29+
====
30+
If you are using the MetalLB Operator and there are existing `FRRConfiguration` CRs in the `metallb-system` namespace created by cluster administrators or third-party cluster components other than MetalLB Operator, you must:
31+
32+
- Ensure that these existing `FRRConfiguration` CRs are copied to the `openshift-frr-k8s` namespace.
33+
- Ensure that the third-party cluster components use the new namespace for the `FRRConfiguration` CRs that they create.
34+
====
35+
36+
[id="cluster-network-operator_{context}"]
37+
== Cluster Network Operator configuration
38+
39+
The Cluster Network Operator API exposes the following API field to configure BGP routing:
40+
41+
- `spec.additionalRoutingCapabilities`: Enables deployment of the FRR-K8s daemon for the cluster, which can be used independently of route advertisements. When enabled, the FRR-K8s daemon is deployed on all nodes.
42+
43+
[id="bgp-routing-custom-resources_{context}"]
44+
== BGP routing custom resources
45+
46+
The following custom resources are used to configure BGP routing:
47+
48+
`FRRConfiguration`::
49+
This custom resource defines the FRR configuration for the BGP routing. This CR is namespaced.

modules/nw-bgp-frr-k8s-migration.adoc

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * networking/bgp_routing/migrating-frr-k8s-resources.adoc
4+
5+
:_mod-docs-content-type: CONCEPT
6+
[id="nw-bgp-frr-k8s-migration_{context}"]
7+
= Migrating FRR-K8s resources
8+
9+
You can migrate the FRR-K8s `FRRConfiguration` custom resources from the `metallb-system` namespace to the `openshift-frr-k8s` namespace.
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+
16+
.Procedure
17+
18+
When upgrading from an earlier version of {product-title} with the Metal LB Operator deployed, you must manually migrate your custom `FRRConfiguration` configurations from the `metallb-system` namespace to the `openshift-frr-k8s` namespace. To move these CRs, enter the following commands:
19+
20+
. To create the `openshift-frr-k8s` namespace, enter the following command:
21+
+
22+
[source,terminal]
23+
----
24+
$ oc create namespace openshift-frr-k8s
25+
----
26+
27+
. To automate the migration, create a shell script named `migrate.sh` with the following contents:
28+
+
29+
[source,bash]
30+
----
31+
#!/bin/bash
32+
OLD_NAMESPACE="metallb-system"
33+
NEW_NAMESPACE="openshift-frr-k8s"
34+
FILTER_OUT="metallb-"
35+
oc get frrconfigurations.frrk8s.metallb.io -n "${OLD_NAMESPACE}" -o json |\
36+
jq -r '.items[] | select(.metadata.name | test("'"${FILTER_OUT}"'") | not)' |\
37+
jq -r '.metadata.namespace = "'"${NEW_NAMESPACE}"'"' |\
38+
oc create -f -
39+
----
40+
41+
. To execute the migration, run the following command:
42+
+
43+
[source,terminal]
44+
----
45+
$ bash migrate.sh
46+
----
47+
48+
.Verification
49+
50+
* To confirm that the migration succeeded, run the following command:
51+
+
52+
[source,terminal]
53+
----
54+
$ oc get frrconfigurations.frrk8s.metallb.io -n openshift-frr-k8s
55+
----
56+
57+
After the migration is complete, you can remove the `FRRConfiguration` custom resources from the `metallb-system` namespace.

modules/nw-bgp-routing-disable.adoc

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/bgp_routing/disabling-bgp-routing.adoc
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="nw-bgp-routing-config_{context}"]
7+
= Disabling Border Gateway Protocol (BGP) routing
8+
9+
As a cluster administrator, you can disable Border Gateway Protocol (BGP) routing support for your cluster on bare-metal infrastructure.
10+
11+
[id="enabling-bgp-routing-support_{context}"]
12+
== Enabling BGP routing support
13+
14+
As a cluster administrator, you can disable BGP routing support for your cluster.
15+
16+
.Prerequisites
17+
18+
* You have installed the {oc-first}.
19+
* You are logged in to the cluster as a user with the `cluster-admin` role.
20+
* The cluster is installed on compatible infrastructure.
21+
22+
.Procedure
23+
24+
* To disable dynamic routing, enter the following command:
25+
+
26+
[source,terminal]
27+
----
28+
$ oc patch network.operator cluster -p '{
29+
"spec": {
30+
"additionalRoutingCapabilities": null
31+
}
32+
}'
33+
----

modules/nw-bgp-routing-enable.adoc

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * networking/bgp_routing/enabling-bgp-routing.adoc
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="nw-bgp-routing-config_{context}"]
7+
= Enabling Border Gateway Protocol (BGP) routing
8+
9+
As a cluster administrator, you can enable Border Gateway Protocol (BGP) routing support for your cluster on bare-metal infrastructure.
10+
11+
If you are using BGP routing in conjunction with the MetalLB Operator, the necessary BGP routing support is enabled automatically. You do not need to manually enable BGP routing support.
12+
13+
[id="enabling-bgp-routing-support_{context}"]
14+
== Enabling BGP routing support
15+
16+
As a cluster administrator, you can enable BGP routing support for your cluster.
17+
18+
.Prerequisites
19+
20+
* You have installed the {oc-first}.
21+
* You are logged in to the cluster as a user with the `cluster-admin` role.
22+
* The cluster is installed on compatible infrastructure.
23+
24+
.Procedure
25+
26+
* To enable a dynamic routing provider, enter the following command:
27+
+
28+
[source,terminal]
29+
----
30+
$ oc patch network.operator cluster -p '{
31+
"spec": {
32+
"additionalRoutingCapabilities": ["FRR"]
33+
}
34+
}'
35+
----

modules/nw-operator-cr.adoc

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,22 @@ endif::operator[]
110110
|`object`
111111
|Configures the network plugin for the cluster network.
112112

113+
|`spec.additionalRoutingCapabilities.providers`
114+
|`array`
115+
|This setting enables a dynamic routing provider. The FRR routing capability provider is required for the route advertisement feature. The only supported value is `FRR`.
116+
117+
--
118+
- `FRR`: The FRR routing provider
119+
--
120+
121+
[source,yaml]
122+
----
123+
spec:
124+
additionalRoutingCapabilities:
125+
providers:
126+
- FRR
127+
----
128+
113129
|`spec.kubeProxyConfig`
114130
|`object`
115131
|

networking/bgp_routing/_attributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../_attributes
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
:_mod-docs-content-type: ASSEMBLY
2+
[id="about-bgp-routing"]
3+
= About BGP routing
4+
include::_attributes/common-attributes.adoc[]
5+
:context: about-bgp-routing
6+
7+
toc::[]
8+
9+
This feature provides native Border Gateway Protocol (BGP) routing capabilities for the cluster.
10+
11+
[IMPORTANT]
12+
====
13+
If you are using the MetalLB Operator and there are existing `FRRConfiguration` CRs in the `metallb-system` namespace created by cluster administrators or third-party cluster components other than the MetalLB Operator, you must ensure that they are copied to the `openshift-frr-k8s` namespace or that those third-party cluster components use the new namespace. For more information, see xref:../../networking/bgp_routing/migrating-frr-k8s-resources.adoc#migrating-frr-k8s-resources[Migrating FRR-K8s resources].
14+
====
15+
16+
include::modules/nw-bgp-about.adoc[leveloffset=+1]
17+
include::modules/nw-metallb-frr-k8s-configuration-crd.adoc[leveloffset=+1]
18+
19+
[role="_additional-resources"]
20+
[id="additional-resources_about-bgp-routing"]
21+
== Additional resources
22+
23+
- link:https://docs.frrouting.org/en/latest/bgp.html[FRRouting User Guide: BGP]
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
:_mod-docs-content-type: ASSEMBLY
2+
[id="disabling-bgp-routing"]
3+
= Disabling BGP routing
4+
include::_attributes/common-attributes.adoc[]
5+
:context: disable-bgp-routing
6+
7+
toc::[]
8+
9+
As a cluster administrator, you can enable OVN-Kubernetes Border Gateway Protocol (BGP) routing support for your cluster.
10+
11+
include::modules/nw-bgp-routing-disable.adoc[leveloffset=+1]
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
:_mod-docs-content-type: ASSEMBLY
2+
[id="enabling-bgp-routing"]
3+
= Enabling BGP routing
4+
include::_attributes/common-attributes.adoc[]
5+
:context: enabling-bgp-routing
6+
7+
toc::[]
8+
9+
As a cluster administrator, you can enable OVN-Kubernetes Border Gateway Protocol (BGP) routing support for your cluster.
10+
11+
include::modules/nw-bgp-routing-enable.adoc[leveloffset=+1]

0 commit comments

Comments
 (0)