-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gitlab-runner.yaml
82 lines (80 loc) · 2.69 KB
/
gitlab-runner.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
#
# References:
# - https://docs.gitlab.com/12.4/runner/install/kubernetes.html
# - https://docs.gitlab.com/runner/executors/kubernetes.html#workflow
# - https://gitlab.com/gitlab-org/charts/gitlab-runner/blob/master/values.yaml
repositories:
## Add the Gitlab Helm repository
- name: gitlab
url: "https://charts.gitlab.io"
releases:
- name: "gitlab-runner"
namespace: "gitlab-runner"
labels:
chart: "gitlab-runner"
repo: "gitlab"
component: "gitlab-runner"
namespace: "gitlab-runner"
vendor: "gitlab"
default: "false"
chart: "gitlab/gitlab-runner"
# version: "0.10.1"
version: "0.15.0"
installed: {{ env "GITLAB_RUNNER_INSTALLED" | default "false" }}
wait: true
values:
- runnerRegistrationToken: {{ env "GITLAB_RUNNER_TOKEN" | default "" }}
gitlabUrl: {{ env "GITLAB_URL" | default "https://gitlab.com" }}
runners:
## Run all containers with the privileged flag enabled
## This will allow the docker:dind image to run if you need to run Docker
## commands. Please read the docs before turning this on:
## ref: https://docs.gitlab.com/runner/executors/kubernetes.html#using-docker-dind
##
privileged: true
#
# secret: gitlab-runner
## Gitlab Runner will assign nodes with given labels
## Always use a dedicated node group for gitlab runner jobs to avoid hurting other pods in the same nodes
{{- if eq (env "KUBE_CLUSTER_PROVIDER" | default "eks" ) "eks" }}
nodeSelector:
purpose: gitlab-runner
{{- end }}
{{- if eq (env "KUBE_CLUSTER_PROVIDER" ) "doks" }}
nodeSelector:
doks.digitalocean.com/node-pool: gitlab-runner
{{- end }}
builds:
limits:
memory: 1024Mi
cpu: 500m
requests:
memory: 64Mi
cpu: 100m
rbac:
create: true
resources:
limits:
memory: 512Mi
cpu: 500m
requests:
memory: 64Mi
cpu: 100m
## Gitlab Runner should not be placed to Spot instances, use always regular nodes, because
## gitlab manager is responsible to handle placement of jobs and does not require a lot of resources
affinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: purpose
operator: NotIn
values:
- gitlab-runner
# preferredDuringSchedulingIgnoredDuringExecution:
# - weight: 1
# preference:
# matchExpressions:
# - key: purpose
# operator: NotIn
# values:
# - gitlab-runner