Skip to content

Commit

Permalink
k8s, cluster-up: Copy istio CNI net conf to where Multus expects (#932)
Browse files Browse the repository at this point in the history
Since Multus v4 it expects CNI net conf file to exist at '/etc/cni/net.d'
but isitio generates then at '/etc/cni/multus/net.d'.

Copy istio CNI net conf to where multus expects on cluster-up in order
to enable deploying both Isitio and Multus v4 until proper solution is
available, tracking issue [1] [2].

[1] #906
[2] k8snetworkplumbingwg/multus-cni#982

Signed-off-by: Or Mergi <[email protected]>

Signed-off-by: Or Mergi <[email protected]>
  • Loading branch information
ormergi authored Dec 14, 2022
1 parent f930087 commit 6b053d7
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions cluster-up/cluster/k8s-provider-common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,16 @@ function wait_for_istio_ready() {
fi
}

# copy_istio_cni_conf_files copy the generated Istio CNI net conf file
# (at '/etc/cni/multus/net.d/') to where Multus expect CNI net conf files ('/etc/cni/net.d/')
function copy_istio_cni_conf_files() {
if [ "$KUBEVIRT_DEPLOY_ISTIO" == "true" ] && [ "$KUBEVIRT_WITH_CNAO" == "true" ]; then
for nodeNum in $(seq -f "%02g" 1 $KUBEVIRT_NUM_NODES); do
$ssh node${nodeNum} -- sudo cp -uv /etc/cni/multus/net.d/*istio*.conf /etc/cni/net.d/
done
fi
}

function deploy_cdi() {
if [ "$KUBEVIRT_DEPLOY_CDI" == "true" ]; then
$kubectl create -f /opt/cdi-*-operator.yaml
Expand Down Expand Up @@ -155,4 +165,8 @@ function up() {
sleep 5
done

# FIXME: remove 'copy_istio_cni_conf_files()' as soon as [1] and [2] are resolved
# [1] https://github.com/kubevirt/kubevirtci/issues/906
# [2] https://github.com/k8snetworkplumbingwg/multus-cni/issues/982
copy_istio_cni_conf_files
}

0 comments on commit 6b053d7

Please sign in to comment.