abhishekagarwal87 commented on code in PR #13966:
URL: https://github.com/apache/druid/pull/13966#discussion_r1145753182
##########
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:
Please also add the value of `adapter` in this message.
##########
extensions-contrib/kubernetes-overlord-extensions/src/main/java/org/apache/druid/k8s/overlord/KubernetesTaskRunnerConfig.java:
##########
@@ -38,6 +38,7 @@
@JsonProperty
public boolean debugJobs = false;
+ @Deprecated
Review Comment:
there should be a change in docs too unless this property is not documented
at all.
##########
extensions-contrib/kubernetes-overlord-extensions/src/main/java/org/apache/druid/k8s/overlord/KubernetesTaskRunnerConfig.java:
##########
@@ -38,6 +38,7 @@
@JsonProperty
public boolean debugJobs = false;
+ @Deprecated
Review Comment:
can you add a comment about why this config is deprecated and the new
alternative?
--
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]