# Gitlab Runner on OCP A quick and dirty guide for making the Gitlab Runner work on OCP. This is probably not what you want for you prodcution environment... ## Step 1 | Setup namespace and RBAC ```shell oc new-project gitlab-runner oc apply -f - < /etc/gitlab-runner/config.toml << 'EOF' concurrent = 10 check_interval = 0 [session_server] session_timeout = 1800 [[runners]] name = "openshift-runner" url = "https://gitlab.example.com" token = "YOUR_REGISTRATION_TOKEN" executor = "kubernetes" [runners.kubernetes] namespace = "gitlab-runner" image = "alpine:latest" privileged = true EOF exec gitlab-runner run securityContext: runAsUser: 0 allowPrivilegeEscalation: true volumeMounts: - name: config mountPath: /etc/gitlab-runner volumes: - name: config emptyDir: {} EOF ```