From b59e083408c8c458735ba69b49eaaf091ac2d1db Mon Sep 17 00:00:00 2001 From: Mick van Gelderen Date: Fri, 28 Jun 2024 13:19:17 +0200 Subject: [PATCH] Allow overriding just the args in submitter pod --- ray-operator/controllers/ray/rayjob_controller.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ray-operator/controllers/ray/rayjob_controller.go b/ray-operator/controllers/ray/rayjob_controller.go index 2bc938e5d5..fdacd2a8d5 100644 --- a/ray-operator/controllers/ray/rayjob_controller.go +++ b/ray-operator/controllers/ray/rayjob_controller.go @@ -382,8 +382,8 @@ func (r *RayJobReconciler) getSubmitterTemplate(ctx context.Context, rayJobInsta logger.Info("user-provided submitter template is used; the first container is assumed to be the submitter") } - // If the command in the submitter pod template isn't set, use the default command. - if len(submitterTemplate.Spec.Containers[utils.RayContainerIndex].Command) == 0 { + // If neither the command nor the args are set in the submitter pod template, use the default command. + if len(submitterTemplate.Spec.Containers[utils.RayContainerIndex].Command) == 0 && len(submitterTemplate.Spec.Containers[utils.RayContainerIndex].Args) == 0 { k8sJobCommand, err := common.GetK8sJobCommand(rayJobInstance) if err != nil { return corev1.PodTemplateSpec{}, err