diff --git a/pkg/job/runtime_v2/job/util/kuberuntime/kube_job_builder.go b/pkg/job/runtime_v2/job/util/kuberuntime/kube_job_builder.go index 16b4323b0..8590b7556 100644 --- a/pkg/job/runtime_v2/job/util/kuberuntime/kube_job_builder.go +++ b/pkg/job/runtime_v2/job/util/kuberuntime/kube_job_builder.go @@ -113,6 +113,9 @@ func (p *PodSpecBuilder) containerResources(container *corev1.Container, request } if strings.ToUpper(limitFlavour.Name) == schema.EnvJobLimitFlavourNone { container.Resources.Limits = nil + } else if limitFlavourResource.CPU() == 0 || limitFlavourResource.Memory() == 0 { + // limit set zero, patch the same value as request + container.Resources.Limits = container.Resources.Requests } else { // limit set specified value container.Resources.Limits = k8s.NewResourceList(limitFlavourResource)