https://dagster.io/ logo
#ask-community
Title
# ask-community
a

Agon Shabi

03/03/2023, 12:12 PM
Hello again! Currently facing an issue with some of our user-code deployments on k8s which rely on their (docker: 'entrypoint', k8s: 'command') to do some setup. I can see in the K8sRunLauncher you construct the command (i.e. ["dagster", "api", "execute_run", ...]) and pass them as args to the created spec - this is ideal On the other hand, inside the helm chart for the user-code deployments, you pass:
command: ["dagster"]
args: ["api", "grpc", "-h", "0.0.0.0", ... ]
Could you instead make it:
args: ["dagster", "api", "grpc", "-h", "0.0.0.0", ... ]
i.e. leave "command" unspecified? Thanks again!
d

daniel

03/03/2023, 1:17 PM
Hi Agon - I think we can do this, yes. Out of curiousity, what did you want to set as the command? I was just trying to help another user inject a command without messing up the args who was having difficulty, so a working example would be helpful
a

Agon Shabi

03/03/2023, 1:18 PM
In my case I'd just leave the command empty entirely. This is so that the registered entry point on our docker images is executed, and has the "args" passed to it
Here's a common entrypoint for docker images: https://github.com/krallin/tini
👍 1
d

daniel

03/03/2023, 1:20 PM
Makes sense - is that default ENTRYPOINT something you can share? Or is it sensitive
a

Agon Shabi

03/03/2023, 1:22 PM
I don't think I'll be able to share it in its entirety, but it looks (at least superficially) like this:
ENTRYPOINT ["tini", "--", "docker-entrypoint.sh"]
And then inside
docker-entrypoint.sh
there might be something like:
exec ... "$@"
(ellipses taking place of things I'm not sure I'm allowed to share)
I guess the main thing you'd be interested in is the use of
"$@"
to pass the
args
from kubernetes to the inner 'outer' process - if that makes sense?
d

daniel

03/03/2023, 1:33 PM
Yeah that was the example I was struggling with, but this is helpful, thanks
That should be a quick change to the Helm chart that I can put out today
❤️ 2
a

Agon Shabi

03/03/2023, 1:39 PM
You're a machine, thanks!
d

daniel

03/03/2023, 4:18 PM
PR's here: https://github.com/dagster-io/dagster/pull/12685/files As an aside I tried to turn that tip about `
Copy code
exec "$@"
into a quick how-to here since it comes up frequently: https://github.com/dagster-io/dagster/discussions/12687 - entirely optional but if you don't mind glancing it over and confirming that it matches your understanding, would be very much appreciated
a

Agon Shabi

03/03/2023, 6:33 PM
Hey thanks for such a quick turnaround! Just had a read and that checks out, and works when testing locally 🙂
🙏 1