-
Notifications
You must be signed in to change notification settings - Fork 110
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CRC 2.36 now uses 4.15 and defaults to ovnKubernetes network CNI. Without enabling both `routingViaHost: true` and `ipForwarding: Global` requests are not routed from secondary interfaces causing dns requests to the openstack dnsmasq pod to fail. Proof < OCP 4.15 won't be affected by this change: CRC 2.36: ``` [zuul@controller ~]$ oc get network.operator cluster -o json | jq '.spec["defaultNetwork"].type' "OVNKubernetes" ``` CRC: 2.30 ``` [zuul@controller ~]$ oc get network.operator cluster -o json | jq '.spec["defaultNetwork"].type' "OpenShiftSDN" ```
- Loading branch information
1 parent
93a3266
commit b77874f
Showing
3 changed files
with
45 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
- name: Patch network operator when using OVNKubernetes backend | ||
when: | ||
- not cifmw_openshift_setup_dry_run | ||
block: | ||
- name: Gather network.operator info | ||
register: _network | ||
kubernetes.core.k8s_info: | ||
kubeconfig: "{{ cifmw_openshift_kubeconfig }}" | ||
api_key: "{{ cifmw_openshift_token | default(omit)}}" | ||
context: "{{ cifmw_openshift_context | default(omit)}}" | ||
api_version: "operator.openshift.io/v1" | ||
kind: Network | ||
name: cluster | ||
|
||
- name: Patch network operator | ||
vars: | ||
_network_backend: >- | ||
{{ | ||
_network.resources | | ||
map(attribute="spec.defaultNetwork.type") | | ||
first | ||
}} | ||
when: | ||
- _network_backend == "OVNKubernetes" | ||
kubernetes.core.k8s_json_patch: | ||
api_version: "operator.openshift.io/v1" | ||
kubeconfig: "{{ cifmw_openshift_kubeconfig }}" | ||
kind: Network | ||
name: cluster | ||
persist_config: true | ||
patch: | ||
- path: "/spec/defaultNetwork/ovnKubernetesConfig/gatewayConfig/routingViaHost" | ||
value: true | ||
op: replace | ||
- path: "/spec/defaultNetwork/ovnKubernetesConfig/gatewayConfig/ipForwarding" | ||
value: "Global" | ||
op: replace |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters