-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Description
Description
I would like to be able to configure the container name for the pod template that I supply.
Currently druids overlord extension is not consistent in this regard.
Some occasions (assind side-car termination support) expect the first container in the spec to be the druid main container.
In other places it is hardcoded to "main".
Maybe this could be implemented more flexible by allowing to specify druid.indexer.runner.k8s.druidContainerName.xyz=my-container-name when xyz is the selection key for the customTemplateAdapter.
With this additional configuration the whole configuration looks a bit strange to me though.
So I'd suggest a different configuration structure, but I don't know how this might complicate the code unnecessarily.
Say I had 2 pod templates next to the base template, then I'd suggest this structure:
druid.indexer.runner.k8s.adapter.type=customTemplateAdapter
druid.indexer.runner.k8s.podTemplate.base.filename: /druid/pod-templates/base.yaml
druid.indexer.runner.k8s.podTemplate.base.druidContainerName: main
druid.indexer.runner.k8s.podTemplate.x.filename: /druid/pod-templates/x.yaml
druid.indexer.runner.k8s.podTemplate.x.druidContainerName: my-druid-container-name
druid.indexer.runner.k8s.podTemplate.y.filename: /druid/pod-templates/y.yaml
druid.indexer.runner.k8s.podTemplate.y.druidContainerName: my-other-druid-container-name
Motivation
For logging this is one of multiple indicators for me to route logs to certain sinks.
"main" as the container name is simply too generic here for my purpose.