Skip to content

Instantly share code, notes, and snippets.

@c18s
Created October 29, 2018 19:35
Show Gist options
  • Save c18s/fc79a99bb515e0a2684955629b048a2a to your computer and use it in GitHub Desktop.
Save c18s/fc79a99bb515e0a2684955629b048a2a to your computer and use it in GitHub Desktop.
Gitlab Runner on K8S config map with helm
/entrypoint register --non-interactive --description "builder.services.im" \
{{- range .Values.runners.imagePullSecrets }}
--kubernetes-image-pull-secrets {{ . | quote }} \
{{- end }}
CONFIG_PATH=/home/gitlab-runner/.gitlab-runner/config.toml
echo ' [[runners.kubernetes.volumes.host_path]]' >>$CONFIG_PATH
echo ' name = "docker"' >>$CONFIG_PATH
echo ' mount_path = "/var/run/docker.sock"' >>$CONFIG_PATH
echo ' read_only = false' >>$CONFIG_PATH
echo ' [[runners.kubernetes.volumes.host_path]]' >>$CONFIG_PATH
echo ' name = "login"' >>$CONFIG_PATH
echo ' mount_path = "/root/.docker/config.json"' >>$CONFIG_PATH
echo ' read_only = false' >>$CONFIG_PATH
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment