Hello again! Currently facing an issue with some ...
# ask-community
a
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
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
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
Makes sense - is that default ENTRYPOINT something you can share? Or is it sensitive
a
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
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
You're a machine, thanks!
d
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
Hey thanks for such a quick turnaround! Just had a read and that checks out, and works when testing locally 🙂
🙏 1