diff --git a/clr-k8s-examples/9-multi-network/README.md b/clr-k8s-examples/9-multi-network/README.md index 6402ac3..909e836 100644 --- a/clr-k8s-examples/9-multi-network/README.md +++ b/clr-k8s-examples/9-multi-network/README.md @@ -5,15 +5,13 @@ We launch a `Daemonset` with an `initContainer` which sets up the CNI directories on the host with the necessary binaries and configuration files. -### Customization +> NOTE: SR-IOV devices are not necessary to test multi-network capability -Replace `flannel` configuration in the delegates section with contents of your -default network's cni configuration in [multus-conf.yaml](clr-k8s-examples/9-multi-network/multus-conf.yaml). +### Customization The device plugin will register the SR-IOV enabled devices on the host, specified as `rootDevices` in [sriov-conf.yaml](clr-k8s-examples/9-multi-network/sriov-conf.yaml). - -> Helper [systemd](clr-k8s-examples/9-multi-network/systemd/sriov.service) example config +Helper [systemd](clr-k8s-examples/9-multi-network/systemd/sriov.service) example config is provided, which enables SR-IOV for the above `rootDevices` > NOTE: This assumes homogenous nodes in the cluster diff --git a/clr-k8s-examples/9-multi-network/multus-conf.yaml b/clr-k8s-examples/9-multi-network/multus-conf.yaml deleted file mode 100644 index f85ebc9..0000000 --- a/clr-k8s-examples/9-multi-network/multus-conf.yaml +++ /dev/null @@ -1,21 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: multus-conf - namespace: kube-system -data: - 01-cni-conf.json: | - { - "name": "multus-cni-network", - "type": "multus", - "delegates": [ - { - "type": "flannel", - "delegate": { - "isDefaultGateway": true - } - } - ], - "kubeconfig": "/etc/cni/net.d/multus-kubeconfig" - } - diff --git a/clr-k8s-examples/9-multi-network/multus-sriov-ds.yaml b/clr-k8s-examples/9-multi-network/multus-sriov-ds.yaml index 75bb3d6..b4fdd93 100644 --- a/clr-k8s-examples/9-multi-network/multus-sriov-ds.yaml +++ b/clr-k8s-examples/9-multi-network/multus-sriov-ds.yaml @@ -55,7 +55,7 @@ rules: kind: ConfigMap apiVersion: v1 metadata: - name: multus-certs + name: multus-scripts namespace: kube-system data: install-certs.sh: | @@ -87,6 +87,21 @@ data: user: multus current-context: multus-context EOF + install-multus-conf.sh: | + # copied from https://github.com/intel/multus-cni/blob/master/images/entrypoint.sh + rm -f /host/etc/cni/net.d/00-multus.conf + MASTER_PLUGIN="$(ls /host/etc/cni/net.d | grep -E '\.conf(list)?$' | head -1)" + MASTER_PLUGIN_JSON="$(cat /host/etc/cni/net.d/$MASTER_PLUGIN)" + cat > /host/etc/cni/net.d/00-multus.conf <