Is it supported to use gateway-mode-config to set OVN-Kubernetes gateway mode in RHOCP 4.10 and higher?
Environment
- Red Hat OpenShift Container Platform
- 4.10 and higher
Issue
- In RHOCP 4.8 or 4.9, I configured OVN-Kubernetes to use local gateway as per known issues in release notes. Can I keep configuring local gateway this way?
- Is it supported to still use the gateway-mode-config described in 4.8 release notes in RHOCP 4.10 or higher, now that the
routingViaHostsetting is available?
Resolution
Starting 4.10, it is no longer supported to use the gateway-mode-config configmap to configure local gateway mode in OVN Kubernetes in the way documented in 4.8 release notes.
During the upgrade of 4.10, if gateway-mode-config configmap is present, the spec.defaultNetwork.ovnKubernetesConfig.gatewayConfig.routingViaHost field of the network.operator.openshift.io/cluster object is populated to match it. After that, the configmap is ignored, and it should be removed.
On OCP 4.10+ you can configured by following the official documentation here in the "Configuration for the OVN-Kubernetes CNI cluster network provider" section.
So, if the cluster is in 4.10 or higher and the configmap is still present (check "diagnostic steps" section), it should be removed like this:
$ oc -n openshift-network-operator delete cm gateway-mode-config
configmap "gateway-mode-config" deleted
Root Cause
When shared gateway was made default in 4.8, the gateway-mode-config configmap was introduced as a workaround to keep local gateway for those who require it.
However, this is not a consistent way to configure such a setting, so in 4.10, a proper setting was introduced in the network.operator.openshift.io custom resource to perform this configuration via API.
Diagnostic Steps
-
Check that RHOCP cluster version is 4.10 or higher
$ oc get clusterversion NAME VERSION AVAILABLE PROGRESSING SINCE STATUS version 4.10.56 True False 22h Cluster version is 4.10.56 -
Check if the
gateway-mode-configconfigmap exist$ oc -n openshift-network-operator get cm/gateway-mode-config NAME DATA AGE gateway-mode-config 1 16d
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.