-
Notifications
You must be signed in to change notification settings - Fork 277
NVIDIA-554: DPU-host mode: use ConfigMap for OVN feature enablement instead of per-node script gating #2944
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: master
Are you sure you want to change the base?
Changes from 1 commit
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 |
|---|---|---|
|
|
@@ -569,16 +569,8 @@ data: | |
|
|
||
| echo "I$(date "+%m%d %H:%M:%S.%N") - starting ovnkube-node" | ||
|
|
||
| # enable egress ip, egress firewall, egress qos, egress service | ||
| egress_features_enable_flag="--enable-egress-ip=true --enable-egress-firewall=true --enable-egress-qos=true --enable-egress-service=true" | ||
| init_ovnkube_controller="--init-ovnkube-controller ${K8S_NODE}" | ||
| multi_external_gateway_enable_flag="--enable-multi-external-gateway=true" | ||
| gateway_interface=br-ex | ||
|
|
||
| # enable multicast | ||
| enable_multicast_flag="--enable-multicast" | ||
|
|
||
| # Use OVN_NODE_MODE environment variable, default to "full" if not set | ||
| gateway_interface="br-ex" | ||
| OVN_NODE_MODE=${OVN_NODE_MODE:-full} | ||
| # We check only dpu-host mode and not smart-nic mode here as currently we do not support it yet | ||
| # Once we support it, we will need to check for it here and add relevant code. | ||
|
|
@@ -587,17 +579,10 @@ data: | |
| # https://github.com/ovn-kubernetes/ovn-kubernetes/pull/5327/files | ||
| gateway_interface="derive-from-mgmt-port" | ||
| ovnkube_node_mode="--ovnkube-node-mode dpu-host" | ||
| # disable egress ip for dpu-host mode as it is not supported | ||
| egress_features_enable_flag="" | ||
|
|
||
| # disable multicast for dpu-host mode as it is not supported | ||
| enable_multicast_flag="" | ||
|
|
||
| # disable init-ovnkube-controller for dpu-host mode as it is not supported | ||
| init_ovnkube_controller="" | ||
|
|
||
| # disable multi-external-gateway for dpu-host mode as it is not supported | ||
| multi_external_gateway_enable_flag="" | ||
| fi | ||
|
|
||
| if [ "{{.OVN_GATEWAY_MODE}}" == "shared" ]; then | ||
|
|
@@ -642,17 +627,6 @@ data: | |
| node_mgmt_port_netdev_flags="$node_mgmt_port_netdev_flags --ovnkube-node-mgmt-port-dp-resource-name ${OVNKUBE_NODE_MGMT_PORT_DP_RESOURCE_NAME}" | ||
| fi | ||
|
|
||
| multi_network_enabled_flag= | ||
| if [[ "{{.OVN_MULTI_NETWORK_ENABLE}}" == "true" && "${OVN_NODE_MODE}" != "dpu-host" ]]; then | ||
| multi_network_enabled_flag="--enable-multi-network" | ||
| fi | ||
|
|
||
| network_segmentation_enabled_flag= | ||
| if [[ "${OVN_NODE_MODE}" != "dpu-host" ]]; then | ||
| multi_network_enabled_flag="--enable-multi-network" | ||
| network_segmentation_enabled_flag="--enable-network-segmentation" | ||
| fi | ||
|
|
||
| route_advertisements_enable_flag= | ||
| if [[ "{{.OVN_ROUTE_ADVERTISEMENTS_ENABLE}}" == "true" ]]; then | ||
| route_advertisements_enable_flag="--enable-route-advertisements" | ||
|
|
@@ -662,8 +636,6 @@ data: | |
| if [[ "{{.OVN_EVPN_ENABLE}}" == "true" ]]; then | ||
| evpn_enable_flag="--enable-evpn" | ||
| fi | ||
|
|
||
| preconfigured_udn_addresses_enable_flag="--enable-preconfigured-udn-addresses" | ||
|
|
||
| network_connect_enabled_flag= | ||
| if [[ "{{.OVN_NETWORK_CONNECT_ENABLE}}" == "true" ]]; then | ||
|
|
@@ -675,21 +647,6 @@ data: | |
| network_observability_enabled_flag="--enable-observability" | ||
| fi | ||
|
|
||
| multi_network_policy_enabled_flag= | ||
| if [[ "{{.OVN_MULTI_NETWORK_POLICY_ENABLE}}" == "true"&& "${OVN_NODE_MODE}" != "dpu-host" ]]; then | ||
| multi_network_policy_enabled_flag="--enable-multi-networkpolicy" | ||
| fi | ||
|
|
||
| admin_network_policy_enabled_flag= | ||
| if [[ "${OVN_NODE_MODE}" != "dpu-host" ]]; then | ||
| admin_network_policy_enabled_flag="--enable-admin-network-policy" | ||
| fi | ||
|
|
||
| dns_name_resolver_enabled_flag= | ||
| if [[ "{{.DNS_NAME_RESOLVER_ENABLE}}" == "true" ]]; then | ||
| dns_name_resolver_enabled_flag="--enable-dns-name-resolver" | ||
| fi | ||
|
|
||
| # If IP Forwarding mode is global set it in the host here. IPv6 IP Forwarding shuld be | ||
| # enabled for all interfaces at all times if cluster is configured as single stack IPv6 | ||
| # or dual stack. This will be taken care by ovn-kubernetes(ovn-org/ovn-kubernetes#4376). | ||
|
|
@@ -770,17 +727,9 @@ data: | |
| --export-ovs-metrics \ | ||
| --disable-snat-multiple-gws \ | ||
| ${export_network_flows_flags} \ | ||
| ${multi_network_enabled_flag} \ | ||
| ${network_segmentation_enabled_flag} \ | ||
| ${network_connect_enabled_flag} \ | ||
|
Contributor
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. You're removing |
||
| ${route_advertisements_enable_flag} \ | ||
| ${evpn_enable_flag} \ | ||
| ${preconfigured_udn_addresses_enable_flag} \ | ||
| ${multi_network_policy_enabled_flag} \ | ||
| ${admin_network_policy_enabled_flag} \ | ||
| ${dns_name_resolver_enabled_flag} \ | ||
| ${network_observability_enabled_flag} \ | ||
| ${enable_multicast_flag} \ | ||
| --zone ${K8S_NODE} \ | ||
| --enable-interconnect \ | ||
| --acl-logging-rate-limit "{{.OVNPolicyAuditRateLimit}}" \ | ||
|
|
@@ -795,7 +744,5 @@ data: | |
| ${ovn_v4_masquerade_subnet_opt} \ | ||
| ${ovn_v6_masquerade_subnet_opt} \ | ||
| ${ovn_v4_transit_switch_subnet_opt} \ | ||
| ${ovn_v6_transit_switch_subnet_opt} \ | ||
| ${egress_features_enable_flag} \ | ||
| ${multi_external_gateway_enable_flag} | ||
| ${ovn_v6_transit_switch_subnet_opt} | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -33,14 +33,23 @@ data: | |
| dns-service-name="dns-default" | ||
|
|
||
| [ovnkubernetesfeature] | ||
| enable-egress-ip=true | ||
| enable-egress-firewall=true | ||
| enable-egress-qos=true | ||
| enable-egress-service=true | ||
| {{- if .ReachabilityNodePort }} | ||
| egressip-node-healthcheck-port={{.ReachabilityNodePort}} | ||
| {{- end }} | ||
| {{- if not .OVN_MULTI_NETWORK_ENABLE }} | ||
| enable-multi-network=true | ||
| {{- end }} | ||
|
Comment on lines
-39
to
-41
Contributor
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. OK, so the handling of It looks like when the "network segmentation" stuff was added, we made it so You should remove all of the |
||
| enable-network-segmentation=true | ||
| enable-preconfigured-udn-addresses=true | ||
|
|
||
| {{- if .OVN_MULTI_NETWORK_POLICY_ENABLE }} | ||
| enable-multi-networkpolicy=true | ||
| {{- end }} | ||
| enable-admin-network-policy=true | ||
| enable-multi-external-gateway=true | ||
| enable-multicast=true | ||
| {{- if .DNS_NAME_RESOLVER_ENABLE }} | ||
| enable-dns-name-resolver=true | ||
| {{- end }} | ||
|
|
@@ -120,14 +129,15 @@ data: | |
| {{- if .ReachabilityNodePort }} | ||
| egressip-node-healthcheck-port={{.ReachabilityNodePort}} | ||
| {{- end }} | ||
| {{- if .OVN_MULTI_NETWORK_ENABLE }} | ||
| enable-multi-network=true | ||
| {{- end }} | ||
| {{- if not .OVN_MULTI_NETWORK_ENABLE }} | ||
| enable-multi-network=true | ||
| {{- end }} | ||
| enable-network-segmentation=true | ||
| enable-preconfigured-udn-addresses=true | ||
| {{- if .OVN_MULTI_NETWORK_POLICY_ENABLE }} | ||
| enable-multi-networkpolicy=true | ||
| {{- end }} | ||
| enable-admin-network-policy=true | ||
| enable-multi-external-gateway=true | ||
| enable-multicast=true | ||
| {{- if .DNS_NAME_RESOLVER_ENABLE }} | ||
| enable-dns-name-resolver=true | ||
| {{- end }} | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -130,19 +130,8 @@ spec: | |
| ovn_v6_masquerade_subnet_opt="--gateway-v6-masquerade-subnet {{.V6MasqueradeSubnet}}" | ||
| fi | ||
|
|
||
| dns_name_resolver_enabled_flag= | ||
| if [[ "{{.DNS_NAME_RESOLVER_ENABLE}}" == "true" ]]; then | ||
| dns_name_resolver_enabled_flag="--enable-dns-name-resolver" | ||
| fi | ||
|
|
||
| persistent_ips_enabled_flag="--enable-persistent-ips" | ||
|
|
||
| # This is needed so that converting clusters from GA to TP | ||
| # will rollout control plane pods as well | ||
| network_segmentation_enabled_flag= | ||
| multi_network_enabled_flag="--enable-multi-network" | ||
| network_segmentation_enabled_flag="--enable-network-segmentation" | ||
|
|
||
| route_advertisements_enable_flag= | ||
| if [[ "{{.OVN_ROUTE_ADVERTISEMENTS_ENABLE}}" == "true" ]]; then | ||
| route_advertisements_enable_flag="--enable-route-advertisements" | ||
|
|
@@ -152,22 +141,6 @@ spec: | |
| if [[ "{{.OVN_EVPN_ENABLE}}" == "true" ]]; then | ||
| evpn_enable_flag="--enable-evpn" | ||
| fi | ||
|
|
||
| preconfigured_udn_addresses_enable_flag="--enable-preconfigured-udn-addresses" | ||
|
|
||
| # Enable multi-network policy if configured (control-plane always full mode) | ||
| multi_network_policy_enabled_flag= | ||
| if [[ "{{.OVN_MULTI_NETWORK_POLICY_ENABLE}}" == "true" ]]; then | ||
| multi_network_policy_enabled_flag="--enable-multi-networkpolicy" | ||
| fi | ||
|
|
||
| # Enable admin network policy if configured (control-plane always full mode) | ||
| admin_network_policy_enabled_flag="--enable-admin-network-policy" | ||
|
|
||
| network_connect_enabled_flag= | ||
| if [[ "{{.OVN_NETWORK_CONNECT_ENABLE}}" == "true" ]]; then | ||
| network_connect_enabled_flag="--enable-network-connect" | ||
| fi | ||
|
|
||
| if [ "{{.OVN_GATEWAY_MODE}}" == "shared" ]; then | ||
| gateway_mode_flags="--gateway-mode shared" | ||
|
|
@@ -193,23 +166,11 @@ spec: | |
| ${ovn_v6_transit_switch_subnet_opt} \ | ||
| ${ovn_v4_masquerade_subnet_opt} \ | ||
| ${ovn_v6_masquerade_subnet_opt} \ | ||
| ${dns_name_resolver_enabled_flag} \ | ||
| ${persistent_ips_enabled_flag} \ | ||
| ${multi_network_enabled_flag} \ | ||
| ${network_segmentation_enabled_flag} \ | ||
| ${gateway_mode_flags} \ | ||
| ${network_connect_enabled_flag} \ | ||
|
Contributor
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. You removed the setting of |
||
| ${route_advertisements_enable_flag} \ | ||
| ${evpn_enable_flag} \ | ||
| ${preconfigured_udn_addresses_enable_flag} \ | ||
| --enable-egress-ip=true \ | ||
| --enable-egress-firewall=true \ | ||
| --enable-egress-qos=true \ | ||
| --enable-egress-service=true \ | ||
| --enable-multicast \ | ||
| --enable-multi-external-gateway=true \ | ||
| ${multi_network_policy_enabled_flag} \ | ||
| ${admin_network_policy_enabled_flag} | ||
| ${evpn_enable_flag} | ||
| volumeMounts: | ||
| - mountPath: /run/ovnkube-config/ | ||
| name: ovnkube-config | ||
|
|
||
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.
The PR/commit doesn't actually explain why we can get rid of all of this. Do we implement egress IPs and multicast in DPU mode now? Or does DPU mode just ignore the settings of these flags?