From 467f94727c0c1c64e43c339780c08e67ff199785 Mon Sep 17 00:00:00 2001 From: Killian Muldoon Date: Thu, 3 Jul 2025 17:10:36 +0100 Subject: [PATCH] chore: enable mounting cni directory for ovn-kubernetes enable mounting cni conf and bin directories in ovn-kubernetes Signed-off-by: Killian Muldoon --- helm/ovn-kubernetes-dpf/templates/dpu-manifests.yaml | 6 +++--- .../templates/host-with-dpu-manifests.yaml | 4 ++-- .../templates/host-without-dpu-manifests.yaml | 4 ++-- helm/ovn-kubernetes-dpf/values.yaml | 6 ++++++ helm/ovn-kubernetes-dpf/values.yaml.tmpl | 8 ++++++++ 5 files changed, 21 insertions(+), 7 deletions(-) diff --git a/helm/ovn-kubernetes-dpf/templates/dpu-manifests.yaml b/helm/ovn-kubernetes-dpf/templates/dpu-manifests.yaml index b8f652221e5..f0fc5767961 100644 --- a/helm/ovn-kubernetes-dpf/templates/dpu-manifests.yaml +++ b/helm/ovn-kubernetes-dpf/templates/dpu-manifests.yaml @@ -825,7 +825,7 @@ spec: emptyDir: {} - name: cni-bin-dir hostPath: - path: /opt/cni/bin + path: {{.Values.dpuManifests.cniBinDir }} type: Directory - name: nvipam-daemon-socket-dir hostPath: @@ -854,10 +854,10 @@ spec: path: /var/run/ovn-kubernetes - name: host-opt-cni-bin hostPath: - path: /opt/cni/bin + path: {{.Values.dpuManifests.cniBinDir }} - name: host-etc-cni-netd hostPath: - path: /etc/cni/net.d + path: {{.Values.dpuManifests.cniConfDir }} - name: host-slash hostPath: path: / diff --git a/helm/ovn-kubernetes-dpf/templates/host-with-dpu-manifests.yaml b/helm/ovn-kubernetes-dpf/templates/host-with-dpu-manifests.yaml index 4927f1afd48..5d9b755a190 100644 --- a/helm/ovn-kubernetes-dpf/templates/host-with-dpu-manifests.yaml +++ b/helm/ovn-kubernetes-dpf/templates/host-with-dpu-manifests.yaml @@ -296,10 +296,10 @@ spec: path: /var/run/ovn-kubernetes - name: host-opt-cni-bin hostPath: - path: /opt/cni/bin + path: {{ .Values.nodeWithDPUManifests.cniBinDir}} - name: host-etc-cni-netd hostPath: - path: /etc/cni/net.d + path: {{ .Values.nodeWithDPUManifests.cniConfDir }} - name: host-slash hostPath: path: / diff --git a/helm/ovn-kubernetes-dpf/templates/host-without-dpu-manifests.yaml b/helm/ovn-kubernetes-dpf/templates/host-without-dpu-manifests.yaml index 07fc858ccce..d4d8db076c6 100644 --- a/helm/ovn-kubernetes-dpf/templates/host-without-dpu-manifests.yaml +++ b/helm/ovn-kubernetes-dpf/templates/host-without-dpu-manifests.yaml @@ -617,10 +617,10 @@ spec: path: /var/run/ovn-kubernetes - name: host-opt-cni-bin hostPath: - path: /opt/cni/bin + path: {{ .Values.nodeWithoutDPUManifests.cniBinDir}} - name: host-etc-cni-netd hostPath: - path: /etc/cni/net.d + path: {{ .Values.nodeWithoutDPUManifests.cniConfDir}} - name: host-slash hostPath: path: / diff --git a/helm/ovn-kubernetes-dpf/values.yaml b/helm/ovn-kubernetes-dpf/values.yaml index 48095cfbaf2..a7044113840 100644 --- a/helm/ovn-kubernetes-dpf/values.yaml +++ b/helm/ovn-kubernetes-dpf/values.yaml @@ -22,6 +22,8 @@ nodeWithDPUManifests: nodeMgmtPortNetdev: "" dpuServiceAccountName: ovn-dpu dpuServiceAccountNamespace: ovn-kubernetes + cniBinDir: "/opt/cni/bin" + cniConfDir: "/etc/cni/net.d" # -- Variables related to manifests that are deployed for nodes without DPU nodeWithoutDPUManifests: @@ -30,6 +32,8 @@ nodeWithoutDPUManifests: repository: ${OVNKUBERNETES_IMAGE} tag: ${TAG} pullPolicy: IfNotPresent + cniBinDir: "/opt/cni/bin" + cniConfDir: "/etc/cni/net.d" # -- Variables related to manifests that are deployed on the DPU dpuManifests: @@ -47,6 +51,8 @@ dpuManifests: ipamPFIPIndex: 1 externalDHCP: false gatewayDiscoveryNetwork: "169.254.99.100/32" # This is a "dummy" subnet used to get the default gateway address from DHCP server (via option 121) + cniBinDir: "/opt/cni/bin" + cniConfDir: "/etc/cni/net.d" # -- Variables related to manifests that are needed to setup the OVN Control Plane controlPlaneManifests: diff --git a/helm/ovn-kubernetes-dpf/values.yaml.tmpl b/helm/ovn-kubernetes-dpf/values.yaml.tmpl index 48095cfbaf2..0527cb7079e 100644 --- a/helm/ovn-kubernetes-dpf/values.yaml.tmpl +++ b/helm/ovn-kubernetes-dpf/values.yaml.tmpl @@ -22,6 +22,8 @@ nodeWithDPUManifests: nodeMgmtPortNetdev: "" dpuServiceAccountName: ovn-dpu dpuServiceAccountNamespace: ovn-kubernetes + cniBinDir: "/opt/cni/bin" + cniConfDir: "/etc/cni/net.d" # -- Variables related to manifests that are deployed for nodes without DPU nodeWithoutDPUManifests: @@ -30,6 +32,8 @@ nodeWithoutDPUManifests: repository: ${OVNKUBERNETES_IMAGE} tag: ${TAG} pullPolicy: IfNotPresent + cniBinDir: "/opt/cni/bin" + cniConfDir: "/etc/cni/net.d" # -- Variables related to manifests that are deployed on the DPU dpuManifests: @@ -47,6 +51,8 @@ dpuManifests: ipamPFIPIndex: 1 externalDHCP: false gatewayDiscoveryNetwork: "169.254.99.100/32" # This is a "dummy" subnet used to get the default gateway address from DHCP server (via option 121) + cniBinDir: "/opt/cni/bin" + cniConfDir: "/etc/cni/net.d" # -- Variables related to manifests that are needed to setup the OVN Control Plane controlPlaneManifests: @@ -55,6 +61,8 @@ controlPlaneManifests: repository: ${OVNKUBERNETES_IMAGE} tag: ${TAG} pullPolicy: IfNotPresent + cniBinDir: "/opt/cni/bin" + cniConfDir: "/etc/cni/net.d" # -- Endpoint of Kubernetes API server k8sAPIServer: https://172.25.0.2:6443