kfaraz commented on code in PR #16772: URL: https://github.com/apache/druid/pull/16772#discussion_r1687359405
########## extensions-contrib/kubernetes-overlord-extensions/src/main/java/org/apache/druid/k8s/overlord/taskadapter/PodTemplateTaskAdapter.java: ########## @@ -138,19 +139,22 @@ public Job fromTask(Task task) throws IOException podTemplateSelectStrategy = dynamicConfig.getPodTemplateSelectStrategy(); } - PodTemplate podTemplate = podTemplateSelectStrategy.getPodTemplateForTask(task, templates); + Pair<String, PodTemplate> podTemplatePair = podTemplateSelectStrategy.getPodTemplateForTask(task, templates); + assert podTemplatePair.lhs != null && podTemplatePair.rhs != null; return new JobBuilder() .withNewMetadata() .withName(new K8sTaskId(task).getK8sJobName()) .addToLabels(getJobLabels(taskRunnerConfig, task)) .addToAnnotations(getJobAnnotations(taskRunnerConfig, task)) + .addToAnnotations(DruidK8sConstants.TASK_JOB_TEMPLATE, podTemplatePair.lhs) .endMetadata() .withNewSpec() - .withTemplate(podTemplate.getTemplate()) + .withTemplate(podTemplatePair.rhs.getTemplate()) .editTemplate() .editOrNewMetadata() .addToAnnotations(getPodTemplateAnnotations(task)) + .addToAnnotations(DruidK8sConstants.TASK_JOB_TEMPLATE, podTemplatePair.lhs) Review Comment: Ah, thanks for the clarification, I had missed the `editTemplate()` invocation. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org For additional commands, e-mail: commits-h...@druid.apache.org