You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2023/01/12 18:29:56 UTC
[GitHub] [druid] a2l007 commented on a diff in pull request #13655: Better sidecar support
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: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org