Skip to content

Commit 04a96ae

Browse files
committed
OCPBUGS-46042: Swapped out Shared Gateway Mode for routingViaHost
1 parent 76489fe commit 04a96ae

11 files changed

+51
-54
lines changed

_topic_maps/_topic_map.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1621,8 +1621,8 @@ Topics:
16211621
File: converting-to-dual-stack
16221622
- Name: Configuring internal subnets
16231623
File: configure-ovn-kubernetes-subnets
1624-
- Name: Configuring gateway mode
1625-
File: configuring-gateway-mode
1624+
- Name: Configuring a gateway
1625+
File: configuring-gateway
16261626
- Name: Configure an external gateway on the default network
16271627
File: configuring-secondary-external-gateway
16281628
- Name: Configuring an egress IP address

modules/nw-egressnetworkpolicy-about.adoc

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,15 @@ ifeval::["{context}" == "configuring-egress-firewall-ovn"]
88
:api: k8s.ovn.org/v1
99
endif::[]
1010

11+
:_mod-docs-content-type: CONCEPT
1112
[id="nw-egressnetworkpolicy-about_{context}"]
1213
= How an egress firewall works in a project
1314

14-
As a cluster administrator, you can use an _egress firewall_ to
15-
limit the external hosts that some or all pods can access from within the
16-
cluster. An egress firewall supports the following scenarios:
15+
As a cluster administrator, you can use an _egress firewall_ to limit the external hosts that some or all pods can access from within the cluster. An egress firewall supports the following scenarios:
1716

18-
- A pod can only connect to internal hosts and cannot initiate connections to
17+
- A pod can only connect to internal hosts and cannot start connections to
1918
the public internet.
20-
- A pod can only connect to the public internet and cannot initiate connections
19+
- A pod can only connect to the public internet and cannot start connections
2120
to internal hosts that are outside the {product-title} cluster.
2221
- A pod cannot reach specified internal subnets or hosts outside the {product-title} cluster.
2322
- A pod can connect to only specific external hosts.
@@ -26,7 +25,7 @@ For example, you can allow one project access to a specified IP range but deny t
2625

2726
[NOTE]
2827
====
29-
Egress firewall does not apply to the host network namespace. Pods with host networking enabled are unaffected by egress firewall rules.
28+
Egress firewall does not apply to the host network namespace. Egress firewall rules do not impact any pods that have host networking enabled.
3029
====
3130

3231
You configure an egress firewall policy by creating an {kind} custom resource (CR) object. The egress firewall matches network traffic that meets any of the following criteria:
@@ -40,7 +39,7 @@ endif::ovn[]
4039
4140
[IMPORTANT]
4241
====
43-
If your egress firewall includes a deny rule for `0.0.0.0/0`, access to your {product-title} API servers is blocked. You must either add allow rules for each IP address or use the `nodeSelector` type allow rule in your egress policy rules to connect to API servers.
42+
If your egress firewall includes a deny rule for `0.0.0.0/0`, the rule blocks access to your {product-title} API servers. You must either add allow rules for each IP address or use the `nodeSelector` type allow rule in your egress policy rules to connect to API servers.
4443
4544
The following example illustrates the order of the egress firewall rules necessary to ensure API server access:
4645
@@ -85,36 +84,36 @@ An egress firewall has the following limitations:
8584
ifdef::ovn[]
8685
* A maximum of one {kind} object with a maximum of 8,000 rules can be defined per project.
8786

88-
* If you are using the OVN-Kubernetes network plugin with shared gateway mode in Red Hat OpenShift Networking, return ingress replies are affected by egress firewall rules. If the egress firewall rules drop the ingress reply destination IP, the traffic is dropped.
87+
* If you use the OVN-Kubernetes network plugin and you configured `false` for the `routingViaHost` parameter in the `Network` custom resource for your cluster, egress firewall rules impact the return ingress replies. If the egress firewall rules drop the ingress reply destination IP, the traffic is dropped.
8988
endif::ovn[]
9089

91-
Violating any of these restrictions results in a broken egress firewall for the project. Consequently, all external network traffic is dropped, which can cause security risks for your organization.
90+
Violating any of these restrictions results in a broken egress firewall for the project. As a result, all external network traffic drops, which can cause security risks for your organization.
9291

93-
An Egress Firewall resource can be created in the `kube-node-lease`, `kube-public`, `kube-system`, `openshift` and `openshift-` projects.
92+
You can create an Egress Firewall resource in the `kube-node-lease`, `kube-public`, `kube-system`, `openshift` and `openshift-` projects.
9493

9594
[id="policy-rule-order_{context}"]
9695
== Matching order for egress firewall policy rules
9796

98-
The egress firewall policy rules are evaluated in the order that they are defined, from first to last. The first rule that matches an egress connection from a pod applies. Any subsequent rules are ignored for that connection.
97+
The OVN-Kubernetes network plugin evaluates egress firewall policy rules based on the first-to-last order of how you defined the rules. The first rule that matches an egress connection from a pod applies. The plugin ignores any subsequent rules for that connection.
9998

10099
[id="domain-name-server-resolution_{context}"]
101-
== How Domain Name Server (DNS) resolution works
100+
== Domain Name Server (DNS) resolution
102101

103102
If you use DNS names in any of your egress firewall policy rules, proper resolution of the domain names is subject to the following restrictions:
104103

105104
ifdef::ovn[]
106105
* Domain name updates are polled based on a time-to-live (TTL) duration. By default, the duration is 30 minutes. When the egress firewall controller queries the local name servers for a domain name, if the response includes a TTL and the TTL is less than 30 minutes, the controller sets the duration for that DNS name to the returned value. Each DNS name is queried after the TTL for the DNS record expires.
107106
endif::ovn[]
108107

109-
* The pod must resolve the domain from the same local name servers when necessary. Otherwise the IP addresses for the domain known by the egress firewall controller and the pod can be different. If the IP addresses for a hostname differ, the egress firewall might not be enforced consistently.
108+
* The pod must resolve the domain from the same local name servers when necessary. Otherwise the IP addresses for the domain known by the egress firewall controller and the pod can be different. If the IP addresses for a hostname differ, consistent enforcement of the egress firewall does not apply.
110109

111110
* Because the egress firewall controller and pods asynchronously poll the same local name server, the pod might obtain the updated IP address before the egress controller does, which causes a race condition. Due to this current limitation, domain name usage in {kind} objects is only recommended for domains with infrequent IP address changes.
112111

113112
[NOTE]
114113
====
115114
Using DNS names in your egress firewall policy does not affect local DNS resolution through CoreDNS.
116115
117-
However, if your egress firewall policy uses domain names, and an external DNS server handles DNS resolution for an affected pod, you must include egress firewall rules that permit access to the IP addresses of your DNS server.
116+
If your egress firewall policy uses domain names, and an external DNS server handles DNS resolution for an affected pod, you must include egress firewall rules that allow access to the IP addresses of your DNS server.
118117
====
119118

120119
ifdef::ovn[]

modules/nw-ovn-ipsec-north-south-enable.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ After you apply the machine config, the Machine Config Operator reboots affected
2121
* You logged in to the cluster as a user with `cluster-admin` privileges.
2222
* You have an existing PKCS#12 certificate for the IPsec endpoint and a CA cert in PEM format.
2323
* You enabled IPsec in either `Full` or `External` mode on your cluster.
24-
* The OVN-Kubernetes network plugin must be configured in local gateway mode, where `ovnKubernetesConfig.gatewayConfig.routingViaHost=true`.
24+
* You must set the `routingViaHost` parameter to `true` in the `ovnKubernetesConfig.gatewayConfig` specification of the OVN-Kubernetes network plugin.
2525
2626
.Procedure
2727

modules/nw-routeadvertisements-about.adoc

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,18 @@ EgressIP routes: Routes to EgressIPs
1515

1616
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.
1717

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.
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 setting the `routingViaHost` parameter to `true` and manually configuring routes on each node to approximate a similar configuration. With route advertisements you can accomplish this task seamlessly with `routingViaHost` parameter set to `false`.
19+
20+
You could also set the `routingViaHost` parameter to `true` in the `Network` custom resource CR for your cluster, but you must then manually configure routes on each node to simulate a similar configuration. When you enable route advertisements, you can set `routingViaHost=false` in the `Network` CR without having to then manually configure routes one each node.
1921

2022
Route reflectors on the provider network are supported and can reduce the number of BGP connections required to advertise routes on large networks.
2123

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.
24+
If you use EgressIPs with route advertisements enabled, the layer 3 provider network is aware of EgressIP failovers. This means that you can 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.
2325

2426
[id="supported-platforms_{context}"]
2527
== Supported platforms
2628

27-
Advertising routes with border gateway protocol (BGP) is supported on the following infrastructure types:
28-
29-
- Bare-metal
30-
//- {vmw-full} on-premise
29+
Advertising routes with border gateway protocol (BGP) is supported on the bare-metal infrastructure type.
3130

3231
[id="infrastructure-requirements_{context}"]
3332
== Infrastructure requirements

modules/nw-routeadvertisements-example.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ spec:
144144
nodeSelector: {}
145145
----
146146

147-
When the OVN-Kubernetes controller sees this `RouteAdvertisements` CR, it generates generates further `FRRConfiguration` objects based on the selected ones that configure the FRR daemon to advertise the routes. The following example is of one such configuration object, with the number of `FRRConfiguration` objects created depending on the node and networks selected.
147+
When the OVN-Kubernetes controller sees this `RouteAdvertisements` CR, it generates further `FRRConfiguration` objects based on the selected ones that configure the FRR daemon to advertise the routes. The following example is of one such configuration object, with the number of `FRRConfiguration` objects created depending on the node and networks selected.
148148

149149
.An example of a `FRRConfiguration` CR generated by OVN-Kubernetes
150150
[source,yaml]
@@ -211,7 +211,7 @@ Blue CUDN::
211211

212212
[NOTE]
213213
====
214-
This approach is available only when you use OVN-Kubernetes in local gateway mode by setting `routingViaHost=true`.
214+
This approach is available only when you set `routingViaHost=true` in the `ovnKubernetesConfig.gatewayConfig` specification of the OVN-Kubernetes network plugin.
215215
====
216216

217217
In the following configuration, an additional `FRRConfiguration` CR configures peering with the PE router on the blue and red VLANs:

modules/nwt-gateway-mode.adoc renamed to modules/nwt-configure-egress-routing-policies.adoc

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
//
33

44
:_mod-docs-content-type: PROCEDURE
5-
[id="nwt-gateway-mode_{context}"]
6-
= Setting local and shared gateway modes
5+
[id="nwt-configure-egress-routing-policies_{context}"]
6+
= Configuring egress routing policies
77

8-
As a cluster administrator you can configure the gateway mode using the `gatewayConfig` spec in the Cluster Network Operator. The following procedure can be used to set the `routingViaHost` field to `true` for local mode or `false` for shared mode.
8+
As a cluster administrator you can configure egress routing policies by using the `gatewayConfig` specification in the Cluster Network Operator (CNO). You can use the following procedure to set the `routingViaHost` field to `true` or `false`.
99

10-
You can follow the optional step 4 to enable IP forwarding alongside local gateway mode if you need the host network of the node to act as a router for traffic not related to OVN-Kubernetes. For example, possible use cases for combining local gateway mode with IP forwarding include:
10+
You can follow the optional step in the procedure to enable IP forwarding alongside the `routingViaHost=true` configuration if you need the host network of the node to act as a router for traffic not related to OVN-Kubernetes. For example, possible use cases for combining local gateway with IP forwarding include:
1111

1212
* Configuring all pod egress traffic to be forwarded via the node's IP
1313
@@ -28,14 +28,14 @@ You can follow the optional step 4 to enable IP forwarding alongside local gatew
2828
$ oc get network.operator cluster -o yaml > network-config-backup.yaml
2929
----
3030

31-
. Set the `routingViaHost` parameter to `true` for local gateway mode by running the following command:
31+
. Set the `routingViaHost` parameter to `true` by entering the following command. Egress traffic then gets routed through a specific gateway according to the routes that you configured on the node.
3232
+
3333
[source,terminal]
3434
----
3535
$ oc patch networks.operator.openshift.io cluster --type=merge -p '{"spec":{"defaultNetwork":{"ovnKubernetesConfig":{"gatewayConfig":{"routingViaHost": true}}}}}'
3636
----
3737

38-
. Verify that local gateway mode has been set by running the following command:
38+
. Verify the correct application of the `routingViaHost=true` configuration by running the following command:
3939
+
4040
[source,terminal]
4141
----
@@ -58,14 +58,15 @@ gatewayConfig:
5858
ipsecConfig:
5959
# ...
6060
----
61-
<1> A value of `true` sets local gateway mode and a value of `false` sets shared gateway mode. In local gateway mode, traffic is routed through the host. In shared gateway mode, traffic is not routed through the host.
61+
<1> A value of `true` means that egress traffic gets routed through a specific local gateway on the node that hosts the pod. A value of `false` for the parameter means that a group of nodes share a single gateway so traffic does not get routed through a single host.
6262

6363
. Optional: Enable IP forwarding globally by running the following command:
6464
+
6565
[source,terminal]
6666
----
6767
$ oc patch network.operator cluster --type=merge -p '{"spec":{"defaultNetwork":{"ovnKubernetesConfig":{"gatewayConfig":{"ipForwarding": "Global"}}}}}'
6868
----
69+
+
6970
.. Verify that the `ipForwarding` spec has been set to `Global` by running the following command:
7071
+
7172
[source,terminal]

modules/telco-core-cluster-network-operator.adoc

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,10 @@ New in this release::
1212
Description::
1313
+
1414
--
15-
The Cluster Network Operator (CNO) deploys and manages the cluster network components including the default OVN-Kubernetes network plugin during cluster installation.
16-
The CNO allows for configuring primary interface MTU settings, OVN gateway modes to use node routing tables for pod egress, and additional secondary networks such as MACVLAN.
15+
The Cluster Network Operator (CNO) deploys and manages the cluster network components including the default OVN-Kubernetes network plugin during cluster installation. The CNO allows for configuring primary interface MTU settings, OVN gateway configurations to use node routing tables for pod egress, and additional secondary networks such as MACVLAN.
1716

1817
In support of network traffic separation, multiple network interfaces are configured through the CNO.
19-
Traffic steering to these interfaces is configured through static routes applied by using the NMState Operator.
20-
To ensure that pod traffic is properly routed, OVN-K is configured with the `routingViaHost` option enabled.
21-
This setting uses the kernel routing table and the applied static routes rather than OVN for pod egress traffic.
18+
Traffic steering to these interfaces is configured through static routes applied by using the NMState Operator. To ensure that pod traffic is properly routed, OVN-K is configured with the `routingViaHost` option enabled. This setting uses the kernel routing table and the applied static routes rather than OVN for pod egress traffic.
2219

2320
The Whereabouts CNI plugin is used to provide dynamic IPv4 and IPv6 addressing for additional pod network interfaces without the use of a DHCP server.
2421
--

modules/telco-core-load-balancer.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ An alternate load balancer implementation must be used if this is a requirement
3030

3131
Engineering considerations::
3232
* MetalLB is used in BGP mode only for telco core use models.
33-
* For telco core use models, MetalLB is supported only with the OVN-Kubernetes network provider used in local gateway mode.
33+
* For telco core use models, MetalLB is supported only when you set `routingViaHost=true` in the `ovnKubernetesConfig.gatewayConfig` specification of the OVN-Kubernetes network plugin.
3434
See `routingViaHost` in "Cluster Network Operator".
3535
* BGP configuration in MetalLB is expected to vary depending on the requirements of the network and peers.
3636
** You can configure address pools with variations in addresses, aggregation length, auto assignment, and so on.

networking/network_security/configuring-ipsec-ovn.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ include::modules/nw-own-ipsec-modes.adoc[leveloffset=+1]
4242
[id="{context}-prerequisites"]
4343
== Prerequisites
4444

45-
For IPsec support for encrypting traffic to external hosts, ensure that the following prerequisites are met:
45+
For IPsec support for encrypting traffic to external hosts, ensure that you meet the following prerequisites:
4646

47-
* The OVN-Kubernetes network plugin must be configured in local gateway mode, where `ovnKubernetesConfig.gatewayConfig.routingViaHost=true`.
48-
* The NMState Operator is installed. This Operator is required for specifying the IPsec configuration. For more information, see xref:../../networking/networking_operators/k8s-nmstate-about-the-k8s-nmstate-operator.adoc#k8s-nmstate-about-the-k8s-nmstate-operator[Kubernetes NMState Operator].
47+
* Set `routingViaHost=true` in the `ovnKubernetesConfig.gatewayConfig` specification of the OVN-Kubernetes network plugin.
48+
* Install the NMState Operator. This Operator is required for specifying the IPsec configuration. For more information, see xref:../../networking/networking_operators/k8s-nmstate-about-the-k8s-nmstate-operator.adoc#k8s-nmstate-about-the-k8s-nmstate-operator[Kubernetes NMState Operator].
4949
+
5050
--
5151
[NOTE]

networking/ovn_kubernetes_network_provider/configuring-gateway-mode.adoc

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)