@@ -148,7 +148,7 @@ func (w *rayClusterWebhook) ValidateUpdate(ctx context.Context, oldObj, newObj r
148148
149149 // Init Container related errors
150150 if ptr .Deref (w .Config .MTLSEnabled , true ) {
151- allErrors = append (allErrors , validateHeadInitContainer (rayCluster , w )... )
151+ allErrors = append (allErrors , validateHeadInitContainer (rayCluster , w . Config . IngressDomain )... )
152152 allErrors = append (allErrors , validateWorkerInitContainer (rayCluster )... )
153153 allErrors = append (allErrors , validateHeadEnvVars (rayCluster )... )
154154 allErrors = append (allErrors , validateWorkerEnvVars (rayCluster )... )
@@ -358,10 +358,10 @@ func rayWorkerInitContainer() corev1.Container {
358358 return initContainerWorker
359359}
360360
361- func validateHeadInitContainer (rayCluster * rayv1.RayCluster , w * rayClusterWebhook ) field.ErrorList {
361+ func validateHeadInitContainer (rayCluster * rayv1.RayCluster , domain string ) field.ErrorList {
362362 var allErrors field.ErrorList
363363
364- if err := contains (rayCluster .Spec .HeadGroupSpec .Template .Spec .InitContainers , rayHeadInitContainer (rayCluster , w . Config . IngressDomain ), byContainerName ,
364+ if err := contains (rayCluster .Spec .HeadGroupSpec .Template .Spec .InitContainers , rayHeadInitContainer (rayCluster , domain ), byContainerName ,
365365 field .NewPath ("spec" , "headGroupSpec" , "template" , "spec" , "initContainers" ),
366366 "create-cert Init Container is immutable" ); err != nil {
367367 allErrors = append (allErrors , err )
0 commit comments