@@ -48,6 +48,10 @@ Add the following to the GitLab Runner configuration file `config.toml`:
48
48
name = "gitlab-ci-kubernetes-executor-helper-home"
49
49
mount_path = "/home/helper"
50
50
51
+ [[runners.kubernetes.volumes.empty_dir]]
52
+ name = "gitlab-ci-kubernetes-executor-buildah-cache"
53
+ mount_path = "/home/build/.local/share/containers"
54
+
51
55
[[runners.kubernetes.pod_spec]]
52
56
name = "fix helper HOME"
53
57
patch = '''
@@ -92,6 +96,10 @@ Add the following to the GitLab Runner configuration file `config.toml`:
92
96
name = "gitlab-ci-kubernetes-executor-helper-home"
93
97
mount_path = "/home/helper"
94
98
99
+ [[runners.kubernetes.volumes.pvc]]
100
+ name = "gitlab-ci-kubernetes-executor-buildah-cache"
101
+ mount_path = "/home/build/.local/share/containers"
102
+
95
103
[[runners.kubernetes.pod_spec]]
96
104
name = "fix helper HOME"
97
105
patch = '''
@@ -113,8 +121,8 @@ Add the following to the GitLab Runner configuration file `config.toml`:
113
121
- sh
114
122
- -ec
115
123
- |
116
- chown :$(id -g) /home/build/.werf /builds /home/helper
117
- chmod g+rwx /home/build/.werf /builds /home/helper
124
+ chown :$(id -g) /home/build/.werf /builds /home/helper /home/build/.local/share/containers
125
+ chmod g+rwx /home/build/.werf /builds /home/helper /home/build/.local/share/containers
118
126
securityContext:
119
127
runAsUser: 0
120
128
runAsNonRoot: false
@@ -125,6 +133,8 @@ Add the following to the GitLab Runner configuration file `config.toml`:
125
133
name: gitlab-ci-kubernetes-executor-builds-cache
126
134
- mountPath: /home/helper
127
135
name: gitlab-ci-kubernetes-executor-helper-home
136
+ - mountPath: /home/build/.local/share/containers
137
+ name: gitlab-ci-kubernetes-executor-buildah-cache
128
138
'''
129
139
patch_type = "strategic"
130
140
```
@@ -169,6 +179,18 @@ spec:
169
179
resources:
170
180
requests:
171
181
storage: 30Gi
182
+ ---
183
+ apiVersion: v1
184
+ kind: PersistentVolumeClaim
185
+ metadata:
186
+ name: gitlab-ci-kubernetes-executor-buildah-cache
187
+ namespace: gitlab-ci
188
+ spec:
189
+ accessModes:
190
+ - ReadWriteMany
191
+ resources:
192
+ requests:
193
+ storage: 30Gi
172
194
EOF
173
195
```
174
196
0 commit comments