File tree Expand file tree Collapse file tree 2 files changed +22
-10
lines changed
manifests/stage-nv-peer-mem-driver Expand file tree Collapse file tree 2 files changed +22
-10
lines changed Original file line number Diff line number Diff line change 7878 - name : NO_PROXY
7979 value : {{ .RuntimeSpec.NoProxy }}
8080 volumeMounts :
81- - name : run-mlnx-ofed
82- mountPath : /run/mellanox/drivers
81+ - name : mlnx-ofed-usr-src
82+ mountPath : /run/mellanox/drivers/usr/src
83+ mountPropagation : HostToContainer
84+ - name : mlnx-ofed-lib-modules
85+ mountPath : /run/mellanox/drivers/lib/modules
8386 mountPropagation : HostToContainer
8487 - name : run-nvidia
8588 mountPath : /run/nvidia/drivers
@@ -108,9 +111,16 @@ spec:
108111 initialDelaySeconds : 10
109112 failureThreshold : 1
110113 volumes :
111- - name : run-mlnx-ofed
114+ {{ $ofedPath := "/run/mellanox/drivers" }}
115+ {{ if .RuntimeSpec.UseHostOFED }}
116+ {{ $ofedPath = "" }}
117+ {{end}}
118+ - name : mlnx-ofed-usr-src
119+ hostPath :
120+ path : {{ $ofedPath }}/usr/src
121+ - name : mlnx-ofed-lib-modules
112122 hostPath :
113- path : /run/mellanox/drivers
123+ path : {{ $ofedPath }}/lib/modules
114124 - name : run-nvidia
115125 hostPath :
116126 path : {{ .CrSpec.GPUDriverSourcePath }}
Original file line number Diff line number Diff line change @@ -47,12 +47,13 @@ type stateNVPeer struct {
4747
4848type nvPeerRuntimeSpec struct {
4949 runtimeSpec
50- CPUArch string
51- OSName string
52- OSVer string
53- HTTPProxy string
54- HTTPSProxy string
55- NoProxy string
50+ CPUArch string
51+ OSName string
52+ OSVer string
53+ HTTPProxy string
54+ HTTPSProxy string
55+ NoProxy string
56+ UseHostOFED bool
5657}
5758
5859type nvPeerManifestRenderData struct {
@@ -146,6 +147,7 @@ func (s *stateNVPeer) getManifestObjects(
146147 HTTPProxy : os .Getenv (consts .HTTPProxy ),
147148 HTTPSProxy : os .Getenv (consts .HTTPSProxy ),
148149 NoProxy : os .Getenv (consts .NoProxy ),
150+ UseHostOFED : cr .Spec .OFEDDriver == nil ,
149151 },
150152 }
151153 // render objects
You can’t perform that action at this time.
0 commit comments