-
Notifications
You must be signed in to change notification settings - Fork 1.8k
OSDOCS-10810: Add BGP routing #88826
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
base: main
Are you sure you want to change the base?
Changes from 10 commits
f554fe6
2b0873a
b55be1c
efa8195
cfdfa95
e3d3b10
d875c62
c0fa223
cc7c99e
cd6da51
cad1c7f
343659b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
// Module included in the following assemblies: | ||
// | ||
// * networking/bgp_routing/about-bgp-routing.adoc | ||
|
||
:_mod-docs-content-type: CONCEPT | ||
[id="nw-bgp-about_{context}"] | ||
jab-rh marked this conversation as resolved.
Show resolved
Hide resolved
|
||
= About Border Gateway Protocol (BGP) routing | ||
|
||
{product-title} supports BGP routing through FRRouting (FRR), a free, open source internet routing protocol suite for Linux and UNIX platforms. 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. | ||
jab-rh marked this conversation as resolved.
Show resolved
Hide resolved
jab-rh marked this conversation as resolved.
Show resolved
Hide resolved
jab-rh marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
[id="supported-platforms_{context}"] | ||
== Supported platforms | ||
|
||
BGP routing is supported on the following infrastructure types: | ||
|
||
- Bare metal | ||
- {vmw-full} on-premise | ||
|
||
[id="prerequisites_{context}"] | ||
== Prerequisites | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This isn't a procedure, so we don't need a section for prerequisites. I'd remove these two lines so that this is at the end of the "Supported platforms" section. |
||
|
||
Use of 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. | ||
jab-rh marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
[id="considerations-for-use-with-the-metallb-operator_{context}"] | ||
== Considerations for use with the MetalLB Operator | ||
|
||
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. | ||
|
||
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. | ||
jab-rh marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
[IMPORTANT] | ||
==== | ||
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 ensure that they are copied to the `openshift-frr-k8s` namespace or that those third-party cluster components use the new namespace. | ||
jab-rh marked this conversation as resolved.
Show resolved
Hide resolved
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This sentence is long and complicated to read. Can we rephrase this in a simpler way or split it into multiple sentences? |
||
==== | ||
|
||
[id="cluster-network-operator_{context}"] | ||
== Cluster Network Operator configuration | ||
|
||
The Cluster Network Operator API exposes the following API field to configure BGP routing: | ||
|
||
- `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. | ||
|
||
[id="bgp-routing-custom-resources_{context}"] | ||
== BGP routing custom resources | ||
|
||
The following custom resources are used to configure BGP routing: | ||
|
||
`FRRConfiguration`:: | ||
This custom resource defines the FRR configuration for the BGP routing. This CR is namespaced. | ||
jab-rh marked this conversation as resolved.
Show resolved
Hide resolved
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just a comment, but it seems like this module serves as a "miscellaneous information" page. Be careful with those, as they can become unwieldy as time progresses and more is added. It might be worth rethinking how this information is organized so that related concepts are grouped together. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
// Module included in the following assemblies: | ||
// | ||
// * networking/bgp_routing/migrating-frr-k8s-resources.adoc | ||
|
||
:_mod-docs-content-type: CONCEPT | ||
[id="nw-bgp-frr-k8s-migration_{context}"] | ||
= Migrating FRR-K8s resources | ||
|
||
You can migrate the FRR-K8s custom resources from the `metallb-system` namespace to the `openshift-frr-k8s` namespace. | ||
|
||
.Prerequisites | ||
|
||
* Install the OpenShift CLI (`oc`). | ||
jab-rh marked this conversation as resolved.
Show resolved
Hide resolved
|
||
* Log in to the cluster with a user with `cluster-admin` privileges. | ||
jab-rh marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
.Procedure | ||
|
||
When upgrading from an earlier version of {product-title} with the Metal LB Operator deployed, you must manually migrate your custom frr-k8s configurations from the `metallb-system` namespace to the `openshift-frr-k8s` namespace. To move these CRs, enter the following commands: | ||
jab-rh marked this conversation as resolved.
Show resolved
Hide resolved
jab-rh marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
. To create the `openshift-frr-k8s` namespace, enter the following command: | ||
+ | ||
[source,terminal] | ||
---- | ||
$ oc create namespace openshift-frr-k8s | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. do we need to create the namespace here? I thought the namespace is created automatically when metalLB operator is upgraded to 4.19, @asood-rh correct me if it's not There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @zhaozhanqi We are copying over custom FRR configurations before upgrading that is why we need to manually create the namespace. If there were no custom FRR configuration just plain upgrade of metallb operator, the namespace will be created by metallb install. |
||
---- | ||
|
||
. To automate the migration, create a `migrate.sh` with the following content: | ||
jab-rh marked this conversation as resolved.
Show resolved
Hide resolved
|
||
+ | ||
[source,bash] | ||
---- | ||
#!/bin/bash | ||
OLD_NAMESPACE="metallb-system" | ||
NEW_NAMESPACE="openshift-frr-k8s" | ||
FILTER_OUT="metallb-" | ||
oc get frrconfigurations.frrk8s.metallb.io -n "${OLD_NAMESPACE}" -o json |\ | ||
jq -r '.items[] | select(.metadata.name | test("'"${FILTER_OUT}"'") | not)' |\ | ||
jq -r '.metadata.namespace = "'"${NEW_NAMESPACE}"'"' |\ | ||
oc create -f - | ||
---- | ||
|
||
. To execute the migration, run the following command: | ||
+ | ||
[source,terminal] | ||
---- | ||
$ bash migrate.sh | ||
jab-rh marked this conversation as resolved.
Show resolved
Hide resolved
|
||
---- | ||
|
||
. To confirm that the migration succeeded, run the following command: | ||
jab-rh marked this conversation as resolved.
Show resolved
Hide resolved
|
||
+ | ||
[source,terminal] | ||
---- | ||
$ oc get frrconfigurations.frrk8s.metallb.io -n openshift-frr-k8s | ||
---- | ||
|
||
After the migration is complete, you can remove the FRR-K8s custom resources from the `metallb-system` namespace. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
// Module included in the following assemblies: | ||
// | ||
// * networking/bgp_routing/configuring-bgp-routing.adoc | ||
|
||
:_mod-docs-content-type: PROCEDURE | ||
[id="nw-bgp-routing-config_{context}"] | ||
= Configuring Border Gateway Protocol (BGP) routing | ||
|
||
As a cluster administrator, you can enable or disable Border Gateway Protocol (BGP) routing support for your cluster on bare-metal infrastructure. | ||
|
||
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. | ||
|
||
[id="enabling-bgp-routing-support_{context}"] | ||
== Enabling BGP routing support | ||
jab-rh marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
As a cluster administrator, you can enable BGP routing support for your cluster. | ||
|
||
.Prerequisites | ||
|
||
* Install the OpenShift CLI (`oc`). | ||
jab-rh marked this conversation as resolved.
Show resolved
Hide resolved
|
||
* Log in to the cluster with a user with `cluster-admin` privileges. | ||
jab-rh marked this conversation as resolved.
Show resolved
Hide resolved
|
||
* Cluster is installed on compatible infrastructure. | ||
jab-rh marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
.Procedure | ||
|
||
* To enable a dynamic routing provider, enter the following command: | ||
+ | ||
[source,terminal] | ||
---- | ||
$ oc patch network.operator cluster -p '{ | ||
"spec": { | ||
"additionalRoutingCapabilities": ["FRR"] | ||
} | ||
}' | ||
---- | ||
|
||
[id="disabling-bgp-routing-support_{context}"] | ||
== Disabling BGP routing support | ||
jab-rh marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
As a cluster administrator, you can disable BGP routing support for your cluster. | ||
|
||
.Prerequisites | ||
|
||
* Install the OpenShift CLI (`oc`). | ||
jab-rh marked this conversation as resolved.
Show resolved
Hide resolved
|
||
* Log in to the cluster with a user with `cluster-admin` privileges. | ||
* Cluster is installed on compatible infrastructure. | ||
|
||
.Procedure | ||
|
||
* To disable dynamic routing, enter the following command: | ||
+ | ||
[source,terminal] | ||
---- | ||
$ oc patch network.operator cluster -p '{ | ||
"spec": { | ||
"additionalRoutingCapabilities": null | ||
} | ||
}' | ||
---- |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../_attributes |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
:_mod-docs-content-type: ASSEMBLY | ||
[id="about-bgp-routing"] | ||
= About BGP routing | ||
include::_attributes/common-attributes.adoc[] | ||
:context: about-bgp-routing | ||
|
||
toc::[] | ||
|
||
This feature provides native Border Gateway Protocol (BGP) routing capabilities for the cluster. | ||
|
||
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]. | ||
jab-rh marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
include::modules/nw-bgp-about.adoc[leveloffset=+1] | ||
include::modules/nw-metallb-frr-k8s-configuration-crd.adoc[leveloffset=+1] | ||
|
||
[role="_additional-resources"] | ||
[id="additional-resources_about-bgp-routing"] | ||
== Additional resources | ||
|
||
- link:https://docs.frrouting.org/en/latest/bgp.html[FRRouting User Guide: BGP] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
:_mod-docs-content-type: ASSEMBLY | ||
[id="configuring-bgp-routing"] | ||
= Configuring BGP routing | ||
include::_attributes/common-attributes.adoc[] | ||
:context: configuring-bgp-routing | ||
|
||
toc::[] | ||
|
||
As a cluster administrator, you can configure OVN-Kubernetes Border Gateway Protocol (BGP) routing support for your cluster. | ||
|
||
include::modules/nw-bgp-routing-config.adoc[leveloffset=+1] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../images |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
:_mod-docs-content-type: ASSEMBLY | ||
[id="migrating-frr-k8s-resources"] | ||
= Migrating FRR-K8s resources | ||
include::_attributes/common-attributes.adoc[] | ||
:context: migrating-frr-k8s-resources | ||
|
||
toc::[] | ||
|
||
All user-created FRR-K8s custom resources (CRs) in the `metallb-system` namespace under {product-title} 4.17 and earlier releases must be migrated to the `openshift-frr-k8s` namespace. As a cluster administrator, complete the steps in this procedure to migrate your FRR-K8s custom resources. | ||
|
||
include::modules/nw-bgp-frr-k8s-migration.adoc[leveloffset=+1] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../modules |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../snippets |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe the project name has a lowercase "k":
FRR-k8s
We should refer to it consistently and accurately wherever it appears. 🙂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kowen-rh, wasn't really familiar with FRR-K8s, but the original documentation work in this area is:
modules/nw-metallb-frr-k8s-merge-multiple-configurations.adoc
and that does capitalize K, so I've been maintaining consistency with this original work.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That makes sense to me as long as it's consistent. 🙂