Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions bindata/network/ovn-kubernetes/managed/004-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,6 @@ data:
enable-multi-network=true
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
{{- if .DNS_NAME_RESOLVER_ENABLE }}
Expand Down Expand Up @@ -131,9 +127,6 @@ data:
enable-multi-network=true
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
{{- if .DNS_NAME_RESOLVER_ENABLE }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,11 @@ spec:
evpn_enable_flag="--enable-evpn"
fi

multi_network_policy_enabled_flag=
if [[ "{{.OVN_MULTI_NETWORK_POLICY_ENABLE}}" == "true" ]]; then
multi_network_policy_enabled_flag="--enable-multi-networkpolicy"
fi

# DROP: remove when older OVN-K images that require --enable-interconnect are no longer supported
enable_interconnect_flag=
if /usr/bin/ovnkube --help 2>&1 | grep -q -- '--enable-interconnect'; then
Expand All @@ -221,6 +226,7 @@ spec:
${ovn_v4_masquerade_subnet_opt} \
${ovn_v6_masquerade_subnet_opt} \
${persistent_ips_enabled_flag} \
${multi_network_policy_enabled_flag} \
${route_advertisements_enable_flag} \
${evpn_enable_flag}
volumeMounts:
Expand Down
3 changes: 0 additions & 3 deletions bindata/network/ovn-kubernetes/self-hosted/004-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,6 @@ data:
enable-multi-network=true
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
{{- if .DNS_NAME_RESOLVER_ENABLE }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,11 @@ spec:
evpn_enable_flag="--enable-evpn"
fi

multi_network_policy_enabled_flag=
if [[ "{{.OVN_MULTI_NETWORK_POLICY_ENABLE}}" == "true" ]]; then
multi_network_policy_enabled_flag="--enable-multi-networkpolicy"
fi

if [ "{{.OVN_GATEWAY_MODE}}" == "shared" ]; then
gateway_mode_flags="--gateway-mode shared"
elif [ "{{.OVN_GATEWAY_MODE}}" == "local" ]; then
Expand Down Expand Up @@ -174,6 +179,7 @@ spec:
${ovn_v4_masquerade_subnet_opt} \
${ovn_v6_masquerade_subnet_opt} \
${persistent_ips_enabled_flag} \
${multi_network_policy_enabled_flag} \
${gateway_mode_flags} \
${route_advertisements_enable_flag} \
${evpn_enable_flag}
Expand Down
8 changes: 7 additions & 1 deletion docs/ovn_node_mode.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,10 @@ The `OVN_NODE_MODE` environment variable is injected into the `ovnkube-node` Pod

### Feature configuration

Feature enablement (egress IP, multicast, multi-network, network segmentation, admin network policy, etc.) is managed through the cluster-wide ConfigMap (`004-config.yaml`) which is passed to ovnkube via `--config-file`. These features are not gated per node mode.
Feature enablement is managed through two mechanisms:

- **ConfigMap-based** (`004-config.yaml`): Most features (egress IP, multi-network, network segmentation, admin network policy, etc.) are configured in the cluster-wide ConfigMap which is passed to ovnkube via `--config-file`.

- **CLI flags** (`ovnkube-control-plane.yaml`): Features that require ovnkube-control-plane pod restarts on configuration changes (multicast, multi-networkpolicy) are enabled via CLI flags (e.g., `--enable-multicast`, `--enable-multi-networkpolicy`) to ensure the control-plane pods restart automatically when the feature is toggled. Note that ovnkube-node pods already restart when the ConfigMap changes, so only control-plane-specific features require CLI flags.

These features are not gated per node mode.
2 changes: 0 additions & 2 deletions pkg/network/ovn_kubernetes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -743,7 +743,6 @@ egressip-node-healthcheck-port=9107
enable-multi-network=true
enable-network-segmentation=true
enable-preconfigured-udn-addresses=true
enable-multi-networkpolicy=true
enable-admin-network-policy=true
enable-multi-external-gateway=true

Expand Down Expand Up @@ -838,7 +837,6 @@ egressip-node-healthcheck-port=9107
enable-multi-network=true
enable-network-segmentation=true
enable-preconfigured-udn-addresses=true
enable-multi-networkpolicy=true
enable-admin-network-policy=true
enable-multi-external-gateway=true

Expand Down