nlippis commented on code in PR #13966:
URL: https://github.com/apache/druid/pull/13966#discussion_r1146176073
##########
extensions-contrib/kubernetes-overlord-extensions/src/main/java/org/apache/druid/k8s/overlord/KubernetesTaskRunnerFactory.java:
##########
@@ -84,18 +93,58 @@ public KubernetesTaskRunner build()
client = new DruidKubernetesClient();
}
- K8sTaskAdapter adapter;
- if (kubernetesTaskRunnerConfig.sidecarSupport) {
- adapter = new MultiContainerTaskAdapter(
+ runner = new KubernetesTaskRunner(
+ buildTaskAdapter(client),
+ kubernetesTaskRunnerConfig,
+ taskQueueConfig,
+ taskLogPusher,
+ new DruidKubernetesPeonClient(client,
kubernetesTaskRunnerConfig.namespace, kubernetesTaskRunnerConfig.debugJobs)
+ );
+ return runner;
+ }
+
+ @Override
+ public KubernetesTaskRunner get()
+ {
+ return runner;
+ }
+
+ private TaskAdapter buildTaskAdapter(DruidKubernetesClient client)
+ {
+ String adapter = properties.getProperty(String.format(
+ Locale.ROOT,
+ "%s.%s.adapter.type",
+ IndexingServiceModuleHelper.INDEXER_RUNNER_PROPERTY_PREFIX,
+ TYPE_NAME
+ ));
+
+ if (adapter != null && !MultiContainerTaskAdapter.TYPE.equals(adapter) &&
kubernetesTaskRunnerConfig.sidecarSupport) {
+ throw new IAE(
+ "Only kubernetes pod adapter [%s] can be specified when
sidecarSupport is enabled",
Review Comment:
The value of the adapter is interpolated here, check the next line that
specifies `MultiContainerTaskAdapter.TYPE` as a format argument.
--
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]