@@ -54,6 +54,7 @@ const (
5454 defaultConfigManagerImage = "docker.io/rocm/device-config-manager:v1.4.0"
5555 ConfigManagerName = "device-config-manager"
5656 defaultSAName = "amd-gpu-operator-config-manager"
57+ defaultInitContainerImage = "busybox:1.36"
5758)
5859
5960var configManagerLabelPair = []string {"app.kubernetes.io/name" , ConfigManagerName }
@@ -289,6 +290,10 @@ func (nl *configManager) SetConfigManagerAsDesired(ds *appsv1.DaemonSet, devConf
289290
290291 serviceaccount := defaultSAName
291292 gracePeriod := int64 (1 )
293+ initContainerImage := defaultInitContainerImage
294+ if devConfig .Spec .CommonConfig .InitContainerImage != "" {
295+ initContainerImage = devConfig .Spec .CommonConfig .InitContainerImage
296+ }
292297 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"
293298 switch devConfig .Spec .Driver .DriverType {
294299 case utils .DriverTypeVFPassthrough :
@@ -307,7 +312,7 @@ func (nl *configManager) SetConfigManagerAsDesired(ds *appsv1.DaemonSet, devConf
307312 InitContainers : []v1.Container {
308313 {
309314 Name : "driver-init" ,
310- Image : "busybox:1.36" ,
315+ Image : initContainerImage ,
311316 Command : []string {"sh" , "-c" , initContainerCommand },
312317 SecurityContext : & v1.SecurityContext {Privileged : ptr .To (true )},
313318 VolumeMounts : []v1.VolumeMount {
0 commit comments