a2l007 commented on code in PR #13655:
URL: https://github.com/apache/druid/pull/13655#discussion_r1068478171
##########
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:
Can the podspec have zero containers? Do we need an empty check here in that
case?
--
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]