From 9189b1bae75a5d6bfb7a4a4512c2879db27c1fc5 Mon Sep 17 00:00:00 2001 From: cyclinder Date: Mon, 11 Jul 2022 17:16:42 +0800 Subject: [PATCH] update helm chart for sriov Signed-off-by: cyclinder --- sriov/templates/_helpers.tpl | 3 +++ .../configMap_sriov_device_plugin.yaml | 2 +- .../daemonSet_sriov_device_plugin.yaml | 10 +++++++- sriov/values.yaml | 25 +++++++++++-------- 4 files changed, 28 insertions(+), 12 deletions(-) diff --git a/sriov/templates/_helpers.tpl b/sriov/templates/_helpers.tpl index 0e1e040..c8ac71d 100644 --- a/sriov/templates/_helpers.tpl +++ b/sriov/templates/_helpers.tpl @@ -33,6 +33,9 @@ name: {{ .Values.serviceAccount.name }} - key: node-role.kubernetes.io/master operator: Exists effect: NoSchedule +- key: node-role.kubernetes.io/control-plane + operator: Exists + effect: NoSchedule {{- if index .Values "tolerations" }} {{- if gt (len .Values.tolerations) 0 }} {{ toYaml .Values.tolerations }} diff --git a/sriov/templates/configMap_sriov_device_plugin.yaml b/sriov/templates/configMap_sriov_device_plugin.yaml index 5e435c0..2c52fee 100644 --- a/sriov/templates/configMap_sriov_device_plugin.yaml +++ b/sriov/templates/configMap_sriov_device_plugin.yaml @@ -19,7 +19,7 @@ metadata: name: {{ .Release.Name }}-{{ .Chart.Name }}-{{ .Chart.Version }}-config namespace: kube-system data: - dp-conf.json: |- + config.json: |- {{ toJson .Values.config.sriov_device_plugin | indent 4 }} {{- end }} {{- end }} diff --git a/sriov/templates/daemonSet_sriov_device_plugin.yaml b/sriov/templates/daemonSet_sriov_device_plugin.yaml index 9f24eb8..2720e68 100644 --- a/sriov/templates/daemonSet_sriov_device_plugin.yaml +++ b/sriov/templates/daemonSet_sriov_device_plugin.yaml @@ -60,7 +60,8 @@ spec: mountPath: {{ .Values.config.sdpMountPaths.log }} - name: config-volume mountPath: {{ .Values.config.sdpMountPaths.configVolume }} - subPath: "dp-conf.json" + - name: device-info + mountPath: {{ .Values.config.sdpMountPaths.deviceInfoPath }} volumes: - name: devicesock hostPath: @@ -71,5 +72,12 @@ spec: - name: config-volume configMap: name: {{ .Release.Name }}-{{ .Chart.Name }}-{{ .Chart.Version }}-config + items: + - key: config.json + path: config.json + - name: device-info + hostPath: + path: {{ .Values.config.sdpMountPaths.deviceInfoPath }} + type: DirectoryOrCreate {{- end }} {{- end }} diff --git a/sriov/values.yaml b/sriov/values.yaml index 685ef2a..02e71d5 100644 --- a/sriov/values.yaml +++ b/sriov/values.yaml @@ -21,11 +21,11 @@ images: registry: docker.io sriovCni: - repository: nfvpe/sriov-cni - tag: v2.2 + repository: ghcr.io/k8snetworkplumbingwg/sriov-cni + tag: v2.6.3 sriovDevicePlugin: - repository: nfvpe/sriov-device-plugin - tag: v3.1 + repository: ghcr.io/k8snetworkplumbingwg/sriov-network-device-plugin + tag: v3.5.1 pullPolicy: IfNotPresent #imagePullSecrets: [] @@ -89,9 +89,10 @@ config: scMountPaths: cnibin: "/host/opt/cni/bin" sdpMountPaths: - deviceSock: "/var/lib/kubelet/device-plugins/" + deviceSock: "/var/lib/kubelet" log: "/var/log" - configVolume: "/etc/pcidp/config.json" + configVolume: "/etc/pcidp/" + deviceInfoPath: "/var/run/k8s.cni.cncf.io/devinfo/dp" sriov_device_plugin: resourceList: - resourceName: intel_sriov_netdevice @@ -101,9 +102,11 @@ config: devices: - 154c - 10ed + - 1889 drivers: - i40evf - ixgbevf + - iavf - resourceName: intel_sriov_dpdk selectors: vendors: @@ -111,6 +114,7 @@ config: devices: - 154c - 10ed + - 1889 drivers: - vfio-pci pfNames: @@ -125,6 +129,7 @@ config: - '1018' drivers: - mlx5_ib + - mlx5_core netAttachDef: dpdkName: 30-intel-sriov-dpdk dpdkResourceName: intel.com/intel_sriov_dpdk @@ -155,10 +160,10 @@ manifests: configMap_sriov_device_plugin: true daemonSet_sriov_device_plugin: true daemonSet_sriov_cni: true - net_attach_def_netdev: true - net_attach_def_dpdk: true - test_netdevice: true - test_dpdk: true + net_attach_def_netdev: false + net_attach_def_dpdk: false + test_netdevice: false + test_dpdk: false #tolerations: []