redun icon indicating copy to clipboard operation
redun copied to clipboard

Add k8s executor [WIP]

Open mattrasmus opened this issue 2 years ago • 1 comments

Hi @dakoner, I am using this branch to provide more detailed code improvements for #19. Please feel to incorporate this code. I'll continue to push to here over the coming weeks as we stabilize the branch.

When you get a chance, could you run make format on your branch to reduce the diff due to linting?

TODO

  • [x] Make kubernetes an extra install.
  • [x] Generalize file staging so that this can be used independent of aws (s3).
  • [x] Pass secrets for object storage access (such as s3) using k8s secrets mechanism.

mattrasmus avatar Mar 07 '22 14:03 mattrasmus

@dakoner I self commented the changes I've made thus far. Feel free to incorporate these into #19.

mattrasmus avatar Mar 07 '22 15:03 mattrasmus

I hope to review this on friday.

dakoner avatar Jan 05 '23 04:01 dakoner

@dakoner @mattrasmus this line needs to be changed to:

container = client.V1Container(name=name, image=image, args=command, env=env)

In kubernetes, the command overwrites Dockers ENTRYPOINT while args overwrites CMD. I ran into an issue with a micromamba image that activated the environment in the entrypoint.sh and therefore didn't work. Changing the command to args fixed this though. Source: https://stackoverflow.com/questions/59248318/kubectl-run-command-vs-arguments

ricomnl avatar Jan 13 '23 17:01 ricomnl

@dakoner @mattrasmus this line needs to be changed to:

container = client.V1Container(name=name, image=image, args=command, env=env)

Thanks @ricomnl for pointing this out! We'll incorporate.

mattrasmus avatar Jan 14 '23 17:01 mattrasmus

Thanks everyone! I'll merge this first beta version of k8s support as is now, and we can continue to refine/improve in smaller follow up PRs.

mattrasmus avatar Jan 14 '23 18:01 mattrasmus