Skip to content

Add support for adding volumeMounts outside of the shared workdir on k8s #46

Closed

Description

@nielstenboom

Hey, thanks for the work on this project, we've recently switched to the Actions Runner Controller with some runners that use the containerMode: kubernetes and works well so far!

There is one thing that would be nice to have added, which is the functionality to in some way mount volumes to the spun up pod by this hook.

The use case for this is as follows:
We have to run python tests on a machine that have a GPU, so we run our tests in a nvidia/cuda:11.3.1-devel-ubuntu18.04 container from a Github action. In this action a lot of packages get pulled from the internet and then installed. Today I wanted to add some caching for this by adding volumeMounts to the spun up pod, but after digging I found out that this does not seem possible (please correct me if I'm wrong, but I couldn't find a way).

Would it be possible to add support in some way to be able to mount other volumes to the pod that gets spun up?

Thanks!

Activity

  1. nielstenboom commented on Dec 14, 2022

    @nielstenboom
    ContributorAuthor

    Did some more digging and found this related issue as well:
    actions/actions-runner-controller#1730

  2. nikola-jokic commented on Dec 14, 2022

    @nikola-jokic
    Collaborator

    Hey @nielstenboom,

    Thank you for using runner container hooks! I'll try to dig into this issue as soon as I can. In the meantime, as long as you have a volume mounted to a pod that contains runner with k8s hooks, you can pass docker options providing volume mounts. That should be parsed by the runner and passed to the hook as userVolumeMounts. Then we use that to build a pod.

    If you can provide an example setup (commands that you use to spin up runners in ARC). And please, don't forget to remove information that should not be visible ☺️

  3. self-assigned this
    on Dec 14, 2022
  4. added
    enhancement
    on Dec 20, 2022
  5. nikola-jokic commented on Oct 4, 2023

    @nikola-jokic
    Collaborator

    Thank you, @nielstenboom, for providing a great starting point! I will close this issue as it is part of the new release ☺️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementk8s

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions