Skip to content

Commit

Permalink
Merge pull request #16 from adamrushuk/add-gitlab-runner-dind
Browse files Browse the repository at this point in the history
Added gitlab-runner-dind chart
  • Loading branch information
adamrushuk authored Feb 8, 2021
2 parents b855436 + 5ede50c commit 043db5b
Show file tree
Hide file tree
Showing 4 changed files with 101 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/ct.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ chart-dirs:
- charts
chart-repos:
- bitnami=https://charts.bitnami.com/bitnami
- gitlab=https://charts.gitlab.io
helm-extra-args: --timeout 600s
23 changes: 23 additions & 0 deletions charts/gitlab-runner-dind/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
27 changes: 27 additions & 0 deletions charts/gitlab-runner-dind/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# A wrapper chart for upstream GitLab Runner chart
# https://github.com/argoproj/argocd-example-apps/tree/master/helm-dependency
apiVersion: v2
name: gitlab-runner-dind
description: A Helm dependency chart for GitLab Runner, with Docker-in-Docker config
type: application

# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "0.24.0"

# https://helm.sh/docs/helm/helm_dependency/
dependencies:
- name: gitlab-runner
version: "0.24.0"
repository: "https://charts.gitlab.io"

maintainers:
- name: adamrushuk
email: adamrushuk@gmail.com
50 changes: 50 additions & 0 deletions charts/gitlab-runner-dind/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# https://gitlab.com/gitlab-org/charts/gitlab-runner/-/blob/0-24-0-stable/values.yaml
# https://docs.gitlab.com/ee/ci/docker/using_docker_build.html#kubernetes
#
# Docker-in-Docker (DinD) config to support installing KinD nodes

# ! IMPORTANT: to override subchart values, you must add the subchart name as the root level value, then indent original values:
gitlab-runner:

image: gitlab/gitlab-runner:alpine-v13.7.0
gitlabUrl: https://gitlab.thehypepipe.co.uk/

# get token from: https://<GITLAB_FQDN>/admin/runners
runnerRegistrationToken: "raQgKr89tiGuusxrPzgk"

unregisterRunners: true

## For RBAC support:
rbac:
create: true
# Define specific rbac permissions.
resources: ["pods", "pods/exec", "secrets"]
verbs: ["get", "list", "watch", "create", "patch", "delete"]

# Main runner config
# https://docs.gitlab.com/ee/ci/docker/using_docker_build.html#kubernetes
# add volumes
# https://docs.gitlab.com/runner/executors/kubernetes.html#using-volumes
runners:
config: |
[[runners]]
[runners.kubernetes]
image = "ubuntu:20.04"
privileged = true
[[runners.kubernetes.volumes.empty_dir]]
name = "docker-certs"
mount_path = "/certs/client"
medium = "Memory"
[[runners.kubernetes.volumes.empty_dir]]
name = "dind-storage"
mount_path = "/var/lib/docker"
[[runners.kubernetes.volumes.host_path]]
name = "hostpath-modules"
mount_path = "/lib/modules"
read_only = true
host_path = "/lib/modules"
[[runners.kubernetes.volumes.host_path]]
name = "hostpath-cgroup"
mount_path = "/sys/fs/cgroup"
host_path = "/sys/fs/cgroup"
tags: "dind"

0 comments on commit 043db5b

Please sign in to comment.