druid-io / druid-operator

Druid Kubernetes Operator
Other
205 stars 93 forks source link

[WIP] Add command args to container creation #268

Open CodingParsley opened 2 years ago

CodingParsley commented 2 years ago

Description

It provides lightweight solution to run some easy startup commands before running druid script For example, for debugging purpose if we want to check if an environment variable has been set before the druid script was run, we can set

startScript: sh
entryArg: echo ${ENV} >> file

The container will run sh -c "echo ${ENV} >> file && /bin/run-druid.sh {nodetype}

Another example use case is that if we need to source a file before running the druid script, it provides a lightweight solution to do that - we can set

startScript: sh
entryArg: source ${filename}

And the container will run sh -c "source ${filename} && /bin/run-druid.sh {nodetype}

If entryArg is not set, the container will act the same as before, thus preserving backward compatibility. The PR also added variable druidScript to customize druid script path.


This PR has:


Key changed/added files in this PR
CodingParsley commented 1 year ago

@AdheipSingh Thank you ❤️

AdheipSingh commented 1 year ago

@AdheipSingh Thank you ❤️

ill run this locally and test, cc @nishantmonu51 for approval to run CI.

just a question, does this PR work if you specify image for all nodeSpecs and also for individual nodeSpec ?

AdheipSingh commented 1 year ago

@xvrl can you approve this PR to run the CI. :)

CodingParsley commented 1 year ago

just a question, does this PR work if you specify image for all nodeSpecs and also for individual nodeSpec ?

Yes, this PR does not change the image of the container

CodingParsley commented 1 year ago

@xvrl Maybe another look? 🙏