diff --git a/flyteplugins/go/tasks/pluginmachinery/flytek8s/pod_helper.go b/flyteplugins/go/tasks/pluginmachinery/flytek8s/pod_helper.go index 7f0560c107..1489d7aaa6 100644 --- a/flyteplugins/go/tasks/pluginmachinery/flytek8s/pod_helper.go +++ b/flyteplugins/go/tasks/pluginmachinery/flytek8s/pod_helper.go @@ -289,7 +289,7 @@ func BuildRawPod(ctx context.Context, tCtx pluginsCore.TaskExecutionContext) (*v // handle pod template override podTemplate := tCtx.TaskExecutionMetadata().GetOverrides().GetPodTemplate() - if tCtx.TaskExecutionMetadata().GetOverrides().GetPodTemplate() != nil { + if podTemplate.GetPodSpec() != nil { podSpec, objectMeta, err = ApplyPodTemplateOverride(objectMeta, podTemplate) if err != nil { return nil, nil, "", err