Skip to content

Kubernetes Overlord Extension: Make peon job container name flexible #18747

@applike-ss

Description

@applike-ss

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions