churromorales commented on code in PR #13655:
URL: https://github.com/apache/druid/pull/13655#discussion_r1068481612


##########
extensions-contrib/kubernetes-overlord-extensions/src/main/java/org/apache/druid/k8s/overlord/common/K8sTaskAdapter.java:
##########
@@ -88,13 +88,17 @@ public Job fromTask(Task task, PeonCommandContext context) 
throws IOException
   {
     String myPodName = System.getenv("HOSTNAME");
     Pod pod = client.executeRequest(client -> 
client.pods().inNamespace(config.namespace).withName(myPodName).get());
-    return createJobFromPodSpec(pod.getSpec(), task, context);
+    PodSpec podSpec = pod.getSpec();
+    massageSpec(config, podSpec);
+    return createJobFromPodSpec(podSpec, task, context);
   }
 
   @Override
   public Task toTask(Pod from) throws IOException
   {
-    List<EnvVar> envVars = from.getSpec().getContainers().get(0).getEnv();
+    PodSpec podSpec = from.getSpec();
+    massageSpec(config, podSpec);
+    List<EnvVar> envVars = podSpec.getContainers().get(0).getEnv();

Review Comment:
   a peon podSpec can't have 0 containers.  To create the peon PodSpec we get 
the druid container from the overlord podSpec and work off that.  



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to