fix(forgejo-runner): use config file, convert to statefulset to create cache mount
This commit is contained in:
parent
9dceb4fe1f
commit
e6f55840e2
2 changed files with 14 additions and 3 deletions
kubernetes/main/apps/dev/forgejo-runner/app
|
@ -46,7 +46,7 @@ data:
|
||||||
# If it's empty when executing the `daemon`, it will use labels in the `.runner` file.
|
# If it's empty when executing the `daemon`, it will use labels in the `.runner` file.
|
||||||
labels: [
|
labels: [
|
||||||
"docker:docker://node:20-bullseye",
|
"docker:docker://node:20-bullseye",
|
||||||
// ubuntu
|
# ubuntu
|
||||||
"ubuntu-latest:docker://ghcr.io/catthehacker/ubuntu:act-latest",
|
"ubuntu-latest:docker://ghcr.io/catthehacker/ubuntu:act-latest",
|
||||||
"ubuntu-24.04:docker://ghcr.io/catthehacker/ubuntu:act-24.04",
|
"ubuntu-24.04:docker://ghcr.io/catthehacker/ubuntu:act-24.04",
|
||||||
"ubuntu-22.04:docker://ghcr.io/catthehacker/ubuntu:act-22.04",
|
"ubuntu-22.04:docker://ghcr.io/catthehacker/ubuntu:act-22.04",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# yaml-language-server: $schema=https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.29.4/deployment.json
|
# yaml-language-server: $schema=https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.29.4/deployment.json
|
||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: StatefulSet
|
||||||
metadata:
|
metadata:
|
||||||
name: forgejo-runner
|
name: forgejo-runner
|
||||||
labels:
|
labels:
|
||||||
|
@ -53,7 +53,7 @@ spec:
|
||||||
containers:
|
containers:
|
||||||
- name: runner
|
- name: runner
|
||||||
image: *runnerImg
|
image: *runnerImg
|
||||||
command: ["sh", "-c", "while ! nc -z localhost 2376 </dev/null; do echo 'waiting for docker daemon...'; sleep 5; done; forgejo-runner daemon"]
|
command: ["sh", "-c", "while ! nc -z localhost 2376 </dev/null; do echo 'waiting for docker daemon...'; sleep 5; done; forgejo-runner daemon --config /data/config.yml"]
|
||||||
env:
|
env:
|
||||||
- name: DOCKER_HOST
|
- name: DOCKER_HOST
|
||||||
value: tcp://localhost:2376
|
value: tcp://localhost:2376
|
||||||
|
@ -69,6 +69,8 @@ spec:
|
||||||
- name: runner-config
|
- name: runner-config
|
||||||
mountPath: /data/config.yml
|
mountPath: /data/config.yml
|
||||||
subPath: config.yml
|
subPath: config.yml
|
||||||
|
- name: forgejo-runner-cache
|
||||||
|
mountPath: /cache
|
||||||
- name: daemon
|
- name: daemon
|
||||||
image: docker:27.4.1-dind
|
image: docker:27.4.1-dind
|
||||||
env:
|
env:
|
||||||
|
@ -79,3 +81,12 @@ spec:
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: docker-certs
|
- name: docker-certs
|
||||||
mountPath: /certs
|
mountPath: /certs
|
||||||
|
volumeClaimTemplates:
|
||||||
|
- metadata:
|
||||||
|
name: forgejo-runner-cache
|
||||||
|
spec:
|
||||||
|
accessModes: ["ReadWriteOnce"]
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 10Gi
|
||||||
|
storageClassName: openebs-zfs-mainpool
|
||||||
|
|
Loading…
Add table
Reference in a new issue