Skip to content

GitLab runner

What it is. A program that runs CI jobs. GitLab’s shared runners are limited, so slow jobs, such as the vulnerability scan that downloads a large database, run on a runner we host. It is tagged local-docker.

Docker Compose Kubernetes
Folder docker/gitlab-runner k8s/gitlab-runner
Start docker compose up -d kubectl apply -f manifests/ or helm install
Job runs in A container A pod
Cache Named Docker volumes Persistent volume claims

Both read the same values:

Setting Meaning
Runner token Lets the runner register with GitLab
NVD API key Speeds up the vulnerability database download
SMTP user and password Used by the report e-mail
Report recipient Who receives the pipeline report

Docker reads them from .env. Kubernetes reads them from a Secret; a template with <PLACEHOLDER> values is kept in the repository and the real copy never is.

  • A dedicated namespace, and a Role that lets the runner create job pods only in that namespace.
  • A start script, kept in a ConfigMap, writes the runner’s config.toml from the Secret.
  • Three volumes: runner config, build cache, and the vulnerability database.
  • Delivered both as plain manifests and as a Helm chart with the same result.