Skip to content

Commit 527c19f

Browse files
committed
Add support for --disable-requestedchassis flag in ovnkube controller
This commit adds conditional logic to pass the --disable-requestedchassis flag to the ovnkube controller when the ovn_disable_requestedchassis environment variable is set to "true". The flag is added to the ovnkube-controller-with-node function in dist/images/ovnkube.sh, following the same pattern as other similar configuration flags like --enable-stateless-netpol. This flag is extremely useful when ovnkube is running in DPU mode since its chassis name will differ from the hostname of the DPU host. Signed-off-by: Alin Serdean <[email protected]>
1 parent 54d6ce3 commit 527c19f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

dist/images/ovnkube.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2097,6 +2097,12 @@ ovnkube-controller-with-node() {
20972097
ovn_stateless_netpol_enable_flag="--enable-stateless-netpol"
20982098
fi
20992099

2100+
ovn_disable_requestedchassis_flag=
2101+
if [[ ${ovn_disable_requestedchassis} == "true" ]]; then
2102+
ovn_disable_requestedchassis_flag="--disable-requestedchassis"
2103+
fi
2104+
echo "ovn_disable_requestedchassis_flag=${ovn_disable_requestedchassis_flag}"
2105+
21002106
echo "=============== ovnkube-controller-with-node --init-ovnkube-controller-with-node=========="
21012107
/usr/bin/ovnkube --init-ovnkube-controller ${K8S_NODE} --init-node ${K8S_NODE} \
21022108
${anp_enabled_flag} \
@@ -2150,6 +2156,7 @@ ovnkube-controller-with-node() {
21502156
${ssl_opts} \
21512157
${network_qos_enabled_flag} \
21522158
${ovn_enable_dnsnameresolver_flag} \
2159+
${ovn_disable_requestedchassis_flag} \
21532160
--cluster-subnets ${net_cidr} --k8s-service-cidr=${svc_cidr} \
21542161
--export-ovs-metrics \
21552162
--gateway-mode=${ovn_gateway_mode} ${ovn_gateway_opts} \

0 commit comments

Comments
 (0)