Skip to content

Commit

Permalink
k8s, cluster-up: Copy istio CNI net conf to where Multus expects
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]>
  • Loading branch information
ormergi committed Dec 13, 2022
1 parent 3e49074 commit ee2e69f
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 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,15 @@ 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
}

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

# FIXME: remove 'link_istio_cni_net_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 ee2e69f

Please sign in to comment.