Skip to content

Commit 467f947

Browse files
chore: enable mounting cni directory for ovn-kubernetes
enable mounting cni conf and bin directories in ovn-kubernetes Signed-off-by: Killian Muldoon <[email protected]>
1 parent a351cfb commit 467f947

File tree

5 files changed

+21
-7
lines changed

5 files changed

+21
-7
lines changed

helm/ovn-kubernetes-dpf/templates/dpu-manifests.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -825,7 +825,7 @@ spec:
825825
emptyDir: {}
826826
- name: cni-bin-dir
827827
hostPath:
828-
path: /opt/cni/bin
828+
path: {{.Values.dpuManifests.cniBinDir }}
829829
type: Directory
830830
- name: nvipam-daemon-socket-dir
831831
hostPath:
@@ -854,10 +854,10 @@ spec:
854854
path: /var/run/ovn-kubernetes
855855
- name: host-opt-cni-bin
856856
hostPath:
857-
path: /opt/cni/bin
857+
path: {{.Values.dpuManifests.cniBinDir }}
858858
- name: host-etc-cni-netd
859859
hostPath:
860-
path: /etc/cni/net.d
860+
path: {{.Values.dpuManifests.cniConfDir }}
861861
- name: host-slash
862862
hostPath:
863863
path: /

helm/ovn-kubernetes-dpf/templates/host-with-dpu-manifests.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -296,10 +296,10 @@ spec:
296296
path: /var/run/ovn-kubernetes
297297
- name: host-opt-cni-bin
298298
hostPath:
299-
path: /opt/cni/bin
299+
path: {{ .Values.nodeWithDPUManifests.cniBinDir}}
300300
- name: host-etc-cni-netd
301301
hostPath:
302-
path: /etc/cni/net.d
302+
path: {{ .Values.nodeWithDPUManifests.cniConfDir }}
303303
- name: host-slash
304304
hostPath:
305305
path: /

helm/ovn-kubernetes-dpf/templates/host-without-dpu-manifests.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -617,10 +617,10 @@ spec:
617617
path: /var/run/ovn-kubernetes
618618
- name: host-opt-cni-bin
619619
hostPath:
620-
path: /opt/cni/bin
620+
path: {{ .Values.nodeWithoutDPUManifests.cniBinDir}}
621621
- name: host-etc-cni-netd
622622
hostPath:
623-
path: /etc/cni/net.d
623+
path: {{ .Values.nodeWithoutDPUManifests.cniConfDir}}
624624
- name: host-slash
625625
hostPath:
626626
path: /

helm/ovn-kubernetes-dpf/values.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ nodeWithDPUManifests:
2222
nodeMgmtPortNetdev: ""
2323
dpuServiceAccountName: ovn-dpu
2424
dpuServiceAccountNamespace: ovn-kubernetes
25+
cniBinDir: "/opt/cni/bin"
26+
cniConfDir: "/etc/cni/net.d"
2527

2628
# -- Variables related to manifests that are deployed for nodes without DPU
2729
nodeWithoutDPUManifests:
@@ -30,6 +32,8 @@ nodeWithoutDPUManifests:
3032
repository: ${OVNKUBERNETES_IMAGE}
3133
tag: ${TAG}
3234
pullPolicy: IfNotPresent
35+
cniBinDir: "/opt/cni/bin"
36+
cniConfDir: "/etc/cni/net.d"
3337

3438
# -- Variables related to manifests that are deployed on the DPU
3539
dpuManifests:
@@ -47,6 +51,8 @@ dpuManifests:
4751
ipamPFIPIndex: 1
4852
externalDHCP: false
4953
gatewayDiscoveryNetwork: "169.254.99.100/32" # This is a "dummy" subnet used to get the default gateway address from DHCP server (via option 121)
54+
cniBinDir: "/opt/cni/bin"
55+
cniConfDir: "/etc/cni/net.d"
5056

5157
# -- Variables related to manifests that are needed to setup the OVN Control Plane
5258
controlPlaneManifests:

helm/ovn-kubernetes-dpf/values.yaml.tmpl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ nodeWithDPUManifests:
2222
nodeMgmtPortNetdev: ""
2323
dpuServiceAccountName: ovn-dpu
2424
dpuServiceAccountNamespace: ovn-kubernetes
25+
cniBinDir: "/opt/cni/bin"
26+
cniConfDir: "/etc/cni/net.d"
2527

2628
# -- Variables related to manifests that are deployed for nodes without DPU
2729
nodeWithoutDPUManifests:
@@ -30,6 +32,8 @@ nodeWithoutDPUManifests:
3032
repository: ${OVNKUBERNETES_IMAGE}
3133
tag: ${TAG}
3234
pullPolicy: IfNotPresent
35+
cniBinDir: "/opt/cni/bin"
36+
cniConfDir: "/etc/cni/net.d"
3337

3438
# -- Variables related to manifests that are deployed on the DPU
3539
dpuManifests:
@@ -47,6 +51,8 @@ dpuManifests:
4751
ipamPFIPIndex: 1
4852
externalDHCP: false
4953
gatewayDiscoveryNetwork: "169.254.99.100/32" # This is a "dummy" subnet used to get the default gateway address from DHCP server (via option 121)
54+
cniBinDir: "/opt/cni/bin"
55+
cniConfDir: "/etc/cni/net.d"
5056

5157
# -- Variables related to manifests that are needed to setup the OVN Control Plane
5258
controlPlaneManifests:
@@ -55,6 +61,8 @@ controlPlaneManifests:
5561
repository: ${OVNKUBERNETES_IMAGE}
5662
tag: ${TAG}
5763
pullPolicy: IfNotPresent
64+
cniBinDir: "/opt/cni/bin"
65+
cniConfDir: "/etc/cni/net.d"
5866

5967
# -- Endpoint of Kubernetes API server
6068
k8sAPIServer: https://172.25.0.2:6443

0 commit comments

Comments
 (0)