Skip to content

Commit 0cfed7d

Browse files
committed
feat(docs): add cache section to kubernetes gitlab
Signed-off-by: Evgeniy Frolov <[email protected]>
1 parent 14e556b commit 0cfed7d

File tree

2 files changed

+44
-4
lines changed

2 files changed

+44
-4
lines changed

bin/configurator/static/_includes/en/configurator/partials/ci/gitlab_kubernetes_main_section.md.liquid

+24-2
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ Add the following to the GitLab Runner configuration file `config.toml`:
4848
name = "gitlab-ci-kubernetes-executor-helper-home"
4949
mount_path = "/home/helper"
5050

51+
[[runners.kubernetes.volumes.empty_dir]]
52+
name = "gitlab-ci-kubernetes-executor-buildah-cache"
53+
mount_path = "/home/build/.local/share/containers"
54+
5155
[[runners.kubernetes.pod_spec]]
5256
name = "fix helper HOME"
5357
patch = '''
@@ -92,6 +96,10 @@ Add the following to the GitLab Runner configuration file `config.toml`:
9296
name = "gitlab-ci-kubernetes-executor-helper-home"
9397
mount_path = "/home/helper"
9498

99+
[[runners.kubernetes.volumes.pvc]]
100+
name = "gitlab-ci-kubernetes-executor-buildah-cache"
101+
mount_path = "/home/build/.local/share/containers"
102+
95103
[[runners.kubernetes.pod_spec]]
96104
name = "fix helper HOME"
97105
patch = '''
@@ -113,8 +121,8 @@ Add the following to the GitLab Runner configuration file `config.toml`:
113121
- sh
114122
- -ec
115123
- |
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
118126
securityContext:
119127
runAsUser: 0
120128
runAsNonRoot: false
@@ -125,6 +133,8 @@ Add the following to the GitLab Runner configuration file `config.toml`:
125133
name: gitlab-ci-kubernetes-executor-builds-cache
126134
- mountPath: /home/helper
127135
name: gitlab-ci-kubernetes-executor-helper-home
136+
- mountPath: /home/build/.local/share/containers
137+
name: gitlab-ci-kubernetes-executor-buildah-cache
128138
'''
129139
patch_type = "strategic"
130140
```
@@ -169,6 +179,18 @@ spec:
169179
resources:
170180
requests:
171181
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
172194
EOF
173195
```
174196

bin/configurator/static/_includes/ru/configurator/partials/ci/gitlab_kubernetes_main_section.md.liquid

+20-2
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,10 @@
9292
name = "gitlab-ci-kubernetes-executor-helper-home"
9393
mount_path = "/home/helper"
9494

95+
[[runners.kubernetes.volumes.pvc]]
96+
name = "gitlab-ci-kubernetes-executor-buildah-cache"
97+
mount_path = "/home/build/.local/share/containers"
98+
9599
[[runners.kubernetes.pod_spec]]
96100
name = "fix helper HOME"
97101
patch = '''
@@ -113,8 +117,8 @@
113117
- sh
114118
- -ec
115119
- |
116-
chown :$(id -g) /home/build/.werf /builds /home/helper
117-
chmod g+rwx /home/build/.werf /builds /home/helper
120+
chown :$(id -g) /home/build/.werf /builds /home/helper /home/build/.local/share/containers
121+
chmod g+rwx /home/build/.werf /builds /home/helper /home/build/.local/share/containers
118122
securityContext:
119123
runAsUser: 0
120124
runAsNonRoot: false
@@ -125,6 +129,8 @@
125129
name: gitlab-ci-kubernetes-executor-builds-cache
126130
- mountPath: /home/helper
127131
name: gitlab-ci-kubernetes-executor-helper-home
132+
- mountPath: /home/build/.local/share/containers
133+
name: gitlab-ci-kubernetes-executor-buildah-cache
128134
'''
129135
patch_type = "strategic"
130136
```
@@ -169,6 +175,18 @@ spec:
169175
resources:
170176
requests:
171177
storage: 30Gi
178+
---
179+
apiVersion: v1
180+
kind: PersistentVolumeClaim
181+
metadata:
182+
name: gitlab-ci-kubernetes-executor-buildah-cache
183+
namespace: gitlab-ci
184+
spec:
185+
accessModes:
186+
- ReadWriteMany
187+
resources:
188+
requests:
189+
storage: 30Gi
172190
EOF
173191
```
174192

0 commit comments

Comments
 (0)