actions / actions/actions-runner-controller
Possibility to add command execution within RunnerDeployment
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 6.5k
- Forks
- 1.5k
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 27
Description
What would you like added?
It would be good to have a possibility to call a command within the container defined in RunnerDeployment, just like it can be done in a normal kubernetes deployment, e.g.:
command:
- pwsh.exe
- -command
- ./somescript.ps1
or
command: ["/bin/sh","-c"]
args: [ "some command" ]
(that command part would normally come somewhere under the imagePullPolicy in template.spec)
Why is this needed?
I have built a custom windows-based github runner docker image and I'm using it in RunnerDeployment, I need to be able to run additional scripts within the container.
Actually my biggest issue is that due to using custom image, where in my dockerfile I basically download the latest github runner version, I cannot automate the github runner version upgrade and once it's out of current version the runner isn't available to organization anymore.
I'm trying to tweak it by scheduling a RunnerDeployment to be executed in a pipeline based on cron, where I will also execute the script to pull the latest version of the github runner.
Additional context
Currently this is not supported by
apiVersion: actions.summerwind.dev/v1alpha1
kind: RunnerDeployment
it is complaining about validation issues:
error validating data: ValidationError(RunnerDeployment.spec.template.spec): unknown field "command" in dev.summerwind.actions.v1alpha1.RunnerDeployment.spec.template.spec; if you choose to ignore these errors, turn validation off with --validate=false
if I ignore the validation, then deployment succeeds but the command isn't executed.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing validation for RunnerDeployment.spec.template.spec and how that specification becomes the runner Pod. Confirm how Kubernetes Deployment command and args are represented, then verify that both fields are accepted by the CRD and executed in the resulting container.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions, kubernetes
- Domain
- devops, infrastructure
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100