abhishekagarwal87 commented on code in PR #13966:
URL: https://github.com/apache/druid/pull/13966#discussion_r1145751169
##########
docs/development/extensions-contrib/k8s-jobs.md:
##########
@@ -28,7 +28,22 @@ Consider this an [EXPERIMENTAL](../experimental.md) feature
mostly because it ha
## How it works
-The K8s extension takes the podSpec of your `Overlord` pod and creates a
kubernetes job from this podSpec. Thus if you have sidecars such as Splunk or
Istio it can optionally launch a task as a K8s job. All jobs are natively
restorable, they are decoupled from the druid deployment, thus restarting pods
or doing upgrades has no affect on tasks in flight. They will continue to run
and when the overlord comes back up it will start tracking them again.
+The K8s extension builds a pod spec using the specified pod adapter, the
default implementation takes the podSpec of your `Overlord` pod and creates a
kubernetes job from this podSpec. Thus if you have sidecars such as Splunk or
Istio it can optionally launch a task as a K8s job. All jobs are natively
restorable, they are decoupled from the druid deployment, thus restarting pods
or doing upgrades has no affect on tasks in flight. They will continue to run
and when the overlord comes back up it will start tracking them again.
+
+## Pod Adapters
+The logic deefining how the pod template is built for your kubernetes job
depends on which pod apapter you have specified.
+
+### Single Container Pod Adapter
+The single container pod adapter takes the podSpec of your `Overlord` pod and
creates a kubernetes job from this podSpec. This is the default pod adapter
implementation, to explicitly enable it you can specify the runtime property
`druid.indexer.runner.k8s.adapter.type: singleContainer`
+
+### Multi Container Pod Adapter
+The multi container pod adapter takes the podSpec of your `Overlord` pod and
creates a kubernetes job from this podSpec. It uses kubexit to manage
dependency ordering between the main container that runs your druid peon and
other sidecars defined in the `Overlord` pod spec. To enable this pod adapter
you can specify the runtime property `druid.indexer.runner.k8s.adapter.type:
multiContainer`
+
+### Pod Template Pod Adapter
+The pod template pod adapter allows you to specify a pod template file per
task type. This adapter requires you to specify a `base` pod spec which will
be used in the case that a task specifc pod spec has not been defined. To
enable this pod adapter you can specify the runtime property
`druid.indexer.runner.k8s.adapter.type: podAdapter`
+
+The base pod template must be specified as the runtime property
`druid.indexer.runner.k8s.podTemplate.base: /path/to/basePodSpec.yaml`
+Task specific pod templates must be specified as the runtime property
`druid.indexer.runner.k8s.podTemplate.{taskType}:
/path/to/taskSpecificPodSpec.yaml` where {taskType} is the name of the task
type i.e `index_parallel`
Review Comment:
I am wondering if there are better config values than what is proposed here.
Specifically, `singleContainer` doesn't indicate that its based off Overlord
pod spec. the pod template spec can be single container or multi container as
well. I am struggling to come up with good suggestions myself. maybe something
like `overlordSingleContainer`, `overlordMultiContainer`,
`customTemplateAdapter`
--
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]