@@ -54,6 +54,7 @@ const (
54
54
defaultConfigManagerImage = "docker.io/rocm/device-config-manager:v1.4.0"
55
55
ConfigManagerName = "device-config-manager"
56
56
defaultSAName = "amd-gpu-operator-config-manager"
57
+ defaultInitContainerImage = "busybox:1.36"
57
58
)
58
59
59
60
var configManagerLabelPair = []string {"app.kubernetes.io/name" , ConfigManagerName }
@@ -289,6 +290,10 @@ func (nl *configManager) SetConfigManagerAsDesired(ds *appsv1.DaemonSet, devConf
289
290
290
291
serviceaccount := defaultSAName
291
292
gracePeriod := int64 (1 )
293
+ initContainerImage := defaultInitContainerImage
294
+ if devConfig .Spec .CommonConfig .InitContainerImage != "" {
295
+ initContainerImage = devConfig .Spec .CommonConfig .InitContainerImage
296
+ }
292
297
initContainerCommand := "if [ \" $SIM_ENABLE\" = \" true\" ]; then exit 0; fi; while [ ! -d /host-sys/class/kfd ] || [ ! -d /host-sys/module/amdgpu/drivers/ ]; do echo \" amdgpu driver is not loaded \" ; sleep 2 ;done"
293
298
switch devConfig .Spec .Driver .DriverType {
294
299
case utils .DriverTypeVFPassthrough :
@@ -307,7 +312,7 @@ func (nl *configManager) SetConfigManagerAsDesired(ds *appsv1.DaemonSet, devConf
307
312
InitContainers : []v1.Container {
308
313
{
309
314
Name : "driver-init" ,
310
- Image : "busybox:1.36" ,
315
+ Image : initContainerImage ,
311
316
Command : []string {"sh" , "-c" , initContainerCommand },
312
317
SecurityContext : & v1.SecurityContext {Privileged : ptr .To (true )},
313
318
VolumeMounts : []v1.VolumeMount {
0 commit comments