Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CLI flag to replicate user pod (volumes, image, etc.) settings in job pod #36

Open
Adam-D-Lewis opened this issue Apr 21, 2022 · 0 comments

Comments

@Adam-D-Lewis
Copy link

Adam-D-Lewis commented Apr 21, 2022

It'd be nice for users to have a way to replicate their user pod in the job pod so they could access all their data similarly to how they would if they were running in their Jupyterhub user pod. I'd propose the addition of a --replicateUserPod flag which would cause the initContainers, volumes, volumeMounts, and image of the user pod to be added to the job pod. This might be implemented in the following way:

  • user submits job kbatch submit job --replicateUserPod ...
  • then kbatch client looks for socket.gethostname() to find what pod we're in, and passes hostname to kbatch-proxy
  • kbatch-proxy calls kubernetes.client.CoreV1Api().read_namespaced_pod(hostname, namespace) to get pod spec
    • pulls out initContainers, volumes, volumeMounts, image and add these to spec of job pod to be submitted
  • kbatch-proxy submits job otherwise the same as it does currently
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant