Skip to content

[WIP] Kubernetes executor

This PR adds a Kubernetes executor to multi-runner that has feature parity with the Docker executor.

It allows for privileged builds to be run (currently using a 'privileged' environment variable), meaning dind is supported provided your Kubernetes cluster supports it.

By default the runner will automatically connect to the master of the kubernetes cluster that gitlab-runner is running within. Alternatively, a proxyURL may be specified, or a CA, crt and key file may be specified for cert-based authentication. Basic & token auth is currently not implemented, although would be an easy addition if necessary.

I've been running this for my own builds for a while now and have had no issues. I'm currently working on a full test suite, and as of the time of writing am at 60% code coverage. This PR needs docs updating in order to explain setup of the kubernetes executor.

I'm keen to hear others experience, so please let me know how it goes for you if you do set it up! I've pushed an image for this to Dockerhub. It's available here: https://hub.docker.com/r/munnerz/gitlab-ci-multi-runner/

The gitlab-runner-helper image currently pulls from Dockerhub (munnerz/gitlab-runner-helper) - this might be better moved to the official gitlab dockerhub account if possible.

Merge request reports

Loading