From ce3629612493e0237601f6ce1a63131670dafaaf Mon Sep 17 00:00:00 2001 From: Miguel Duarte Barroso Date: Mon, 24 Feb 2020 17:08:39 +0100 Subject: [PATCH] Specify the CNI mount in the host via a variable Signed-off-by: Miguel Duarte Barroso --- Makefile | 2 +- templates/macvtap.yaml.in | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 9bf1bd09..c62c7cb5 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -CNI_MOUNT_PATH ?= /host/opt/cni/bin +CNI_MOUNT_PATH ?= /opt/cni/bin IMAGE_REGISTRY ?= quay.io/kubevirt IMAGE_NAME ?= macvtap-cni diff --git a/templates/macvtap.yaml.in b/templates/macvtap.yaml.in index aed7b270..0d1cba7e 100644 --- a/templates/macvtap.yaml.in +++ b/templates/macvtap.yaml.in @@ -30,10 +30,10 @@ spec: image: {{ .ImageRegistry }}/{{ .ImageName }}:{{ .ImageTag }} securityContext: privileged: true - command: ['cp', '/macvtap-cni', '{{ .CniMountPath }}/macvtap'] + command: ['cp', '/macvtap-cni', '/host/opt/cni/bin/macvtap'] volumeMounts: - name: cni - mountPath: {{ .CniMountPath }} + mountPath: /host/opt/cni/bin mountPropagation: Bidirectional volumes: - name: deviceplugin @@ -41,4 +41,4 @@ spec: path: /var/lib/kubelet/device-plugins - name: cni hostPath: - path: /opt/cni/bin + path: {{ .CniMountPath }}