GitLab Runner config.toml Executor Tuning Prompt
Tune self-managed runner config.toml — concurrency, executor choice (docker/kubernetes/shell), cache backend, image pull policy, and the new runner authentication tokens that replaced registration tokens.
- Target user
- Engineers operating self-managed GitLab Runners
- Difficulty
- Advanced
- Tools
- Claude, ChatGPT
The prompt
You are an SRE who operates a fleet of self-managed GitLab Runners and has hand-tuned config.toml for throughput, cost, and security across docker and kubernetes executors. I will provide: - Our current config.toml (redacted) and runner version - Where runners live (VMs, Kubernetes, autoscaling) - Pipeline pain points (queueing, slow image pulls, cache misses, noisy-neighbor) - Our GitLab version (to confirm runner auth token vs. deprecated registration token) Your job: 1. **Registration modernization** — confirm we are using runner authentication tokens (created in the UI/API, used with `gitlab-runner register --token glrt-...`), not the deprecated registration-token flow. Explain the migration if we are still on the old path. 2. **Concurrency** — explain global `concurrent` vs. per-runner `limit` vs. `request_concurrency`, and how to set them against actual CPU/memory so we maximize utilization without OOM-killing jobs. 3. **Executor choice** — opinionated guidance on docker vs. kubernetes vs. shell vs. docker-autoscaler for our workload, with the tradeoffs (isolation, startup latency, cost). 4. **Image & pull policy** — set `pull_policy` (`always`/`if-not-present`/`never`) correctly, use `allowed_pull_policies`, and explain how a misconfigured policy lets one project run a stale or untrusted image. 5. **Cache backend** — wire distributed cache (S3/GCS) in `[runners.cache]` so caching survives ephemeral runners, instead of useless local cache on autoscaled hosts. 6. **Kubernetes executor specifics** (if relevant) — resource requests/limits, `[runners.kubernetes]` namespace isolation, service-account scoping, and node selectors/tolerations. 7. **Security hardening** — disable privileged mode unless DinD truly needs it, restrict the docker socket, and isolate runners that build untrusted MR code. Output as: (a) an annotated config.toml diff, (b) a concurrency-sizing calculation from our CPU/mem, (c) the distributed-cache block, (d) a security hardening checklist, (e) a validation plan (queue time, cache hit rate, OOM count before/after). Bias toward: distributed cache for ephemeral runners, least-privilege containers, concurrency sized to real resources.
Run this prompt with AI
Test it, get an AI-improved version, or compare models — live in the Prompt Workspace. No copy-paste.
Related prompts
-
GitLab Runner Kubernetes Executor Pod Spec Tuning Prompt
Tune the Kubernetes executor's pod spec — resource requests/limits, node selectors, ephemeral storage, service-account, and pod-level overrides — so CI jobs schedule reliably without starving the cluster.
-
GitLab Runner Custom Executor Driver Config Prompt
Build and debug a GitLab Runner Custom executor driver (config/prepare/run/cleanup scripts) to run jobs on an environment GitLab does not natively support — such as bespoke VMs, a hypervisor, or an isolated sandbox.
-
GitLab Kubernetes Runner Affinity and Tolerations Prompt
Tune the GitLab Runner Kubernetes executor so CI job pods land on the right nodes — using node selectors, affinity, and tolerations to schedule onto tainted CI node pools (spot, GPU, large-build) without starving other workloads.
-
GitLab CI/CD Helm Chart Deploy Prompt
Build a GitLab CI/CD pipeline that lints, packages, and deploys Helm charts to Kubernetes with per-environment values, atomic upgrades, diff previews, and safe rollbacks.
More GitLab CI/CD prompts & error guides
Browse every GitLab CI/CD prompt and troubleshooting guide in one place.
Reading prompts? Get all 500 in one free PDF
500 battle-tested, copy-paste AI prompts engineered by a senior systems engineer — every one with fill-in placeholders and safety/back-out notes. Drop your email and it's yours.
- 500 prompts: Linux · Kubernetes · Terraform · OpenStack · GitLab · Docker · Monitoring · Incident Response
- Instant PDF download — yours free, forever
- Plus one practical AI-workflow email a week (no spam)
Single opt-in · unsubscribe anytime · no spam.