blob: 73b26b9b2331ee07d3a6d1d10d70aa212947e023 [file] [log] [blame]
Matthias Andreas Benkardc058c562023-01-08 19:04:34 +01001---
2apiVersion: apps/v1
3kind: Deployment
4metadata:
5 name: gitlab-runner
6 namespace: mulk
7 labels:
8 name: gitlab-runner
9 k8s-app: gitlab-runner
10
11spec:
12 replicas: 1
13
14 strategy:
15 rollingUpdate:
16 maxSurge: 1
17 maxUnavailable: 1
18
19 selector:
20 matchLabels:
21 k8s-app: gitlab-runner
22 name: gitlab-runner
23
24 template:
25 metadata:
26 labels:
27 name: gitlab-runner
28 k8s-app: gitlab-runner
29
30 spec:
31 imagePullSecrets:
32 - name: portus-token
33
34 runtimeClassName: kata
35
Matthias Andreas Benkard2a12e5f2023-01-21 18:54:50 +010036 initContainers:
37 - name: init
38 image: docker.io/library/busybox:latest
39
40 command:
41 - sh
42 - -c
43 - cp -v /conf/gitlab-runner/* /etc/gitlab-runner/
44
45 volumeMounts:
46 - name: config-ro
47 mountPath: /conf/gitlab-runner
48 - name: config-rw
49 mountPath: /etc/gitlab-runner
50
Matthias Andreas Benkardc058c562023-01-08 19:04:34 +010051 containers:
52 - name: master
Matthias Andreas Benkard64ba4102023-01-21 21:10:46 +010053 image: docker.benkard.de/mulk/gitlab-runner:hz62pcfdlpcbxygksisxjznj8bj27v42
Matthias Andreas Benkardc058c562023-01-08 19:04:34 +010054
55 securityContext:
56 # In a Kata container, this only gives the container full
57 # access to the guest VM rather than the host. (To ensure
58 # this, it is important to set privileged_without_host_devices
59 # = true in the [plugins.cri.containerd.runtimes.kata] section
60 # of containerd's config.toml.)
61 privileged: true
62
63 volumeMounts:
64 # Configuration data.
Matthias Andreas Benkard2a12e5f2023-01-21 18:54:50 +010065 - name: config-rw
Matthias Andreas Benkardc058c562023-01-08 19:04:34 +010066 mountPath: /etc/gitlab-runner
67
68 # State.
69 - name: docker-data
70 mountPath: /vol/docker-data
71 - name: tmp
72 mountPath: /tmp
73
74 resources:
Matthias Andreas Benkard2a12e5f2023-01-21 18:54:50 +010075 requests:
76 memory: 128Mi
Matthias Andreas Benkardc058c562023-01-08 19:04:34 +010077 limits:
Matthias Andreas Benkard2a12e5f2023-01-21 18:54:50 +010078 memory: 8Gi
Matthias Andreas Benkardc058c562023-01-08 19:04:34 +010079
80 volumes:
Matthias Andreas Benkard2a12e5f2023-01-21 18:54:50 +010081 - name: config-ro
Matthias Andreas Benkardc058c562023-01-08 19:04:34 +010082 secret:
83 secretName: gitlab-runner-config
Matthias Andreas Benkard2a12e5f2023-01-21 18:54:50 +010084 - name: config-rw
85 emptyDir: {}
Matthias Andreas Benkardc058c562023-01-08 19:04:34 +010086 - name: docker-data
87 persistentVolumeClaim:
88 claimName: gitlab-runner-docker
89 - name: tmp
90 emptyDir: {}
91
92---
93apiVersion: v1
94kind: PersistentVolumeClaim
95metadata:
96 name: gitlab-runner-docker
97 namespace: mulk
98 annotations:
99 volume.beta.kubernetes.io/storage-provisioner: rancher.io/local-path
100 volume.kubernetes.io/selected-node: ifirn
101spec:
102 storageClassName: local-path
103 accessModes:
104 - ReadWriteOnce
105 resources:
106 requests:
107 storage: 1Gi