Split Forgejo runners: arm64 on rpi, amd64 dind on siriussec.
Pi keeps host Docker and labels docker-arm64/arm64/docker. T480 runs privileged docker:dind; jobs use docker-amd64/amd64.
This commit is contained in:
parent
8783d77d5e
commit
455c85b01c
4 changed files with 161 additions and 4 deletions
99
apps/base/forgejo/runner-arm64.yaml
Normal file
99
apps/base/forgejo/runner-arm64.yaml
Normal file
|
|
@ -0,0 +1,99 @@
|
|||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: forgejo-runner-arm64
|
||||
namespace: forgejo
|
||||
labels:
|
||||
app: forgejo-runner
|
||||
arch: arm64
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: forgejo-runner
|
||||
arch: arm64
|
||||
strategy:
|
||||
type: Recreate
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: forgejo-runner
|
||||
arch: arm64
|
||||
spec:
|
||||
nodeSelector:
|
||||
kubernetes.io/hostname: rpi
|
||||
tolerations:
|
||||
- key: dedicated
|
||||
operator: Equal
|
||||
value: network
|
||||
effect: PreferNoSchedule
|
||||
securityContext:
|
||||
supplementalGroups: [984]
|
||||
containers:
|
||||
- name: runner
|
||||
image: code.forgejo.org/forgejo/runner:5.0.1
|
||||
imagePullPolicy: IfNotPresent
|
||||
command:
|
||||
- forgejo-runner
|
||||
- --config
|
||||
- /config/config.toml
|
||||
- daemon
|
||||
env:
|
||||
- name: DOCKER_HOST
|
||||
value: unix:///var/run/docker.sock
|
||||
securityContext:
|
||||
privileged: true
|
||||
runAsUser: 0
|
||||
runAsGroup: 0
|
||||
volumeMounts:
|
||||
- name: docker-sock
|
||||
mountPath: /var/run/docker.sock
|
||||
- name: docker-static
|
||||
mountPath: /usr/bin/docker
|
||||
readOnly: true
|
||||
- name: cli-plugins
|
||||
mountPath: /usr/local/lib/docker/cli-plugins
|
||||
readOnly: true
|
||||
- name: config-toml
|
||||
mountPath: /config/config.toml
|
||||
subPath: arm64.toml
|
||||
- name: runner-ini
|
||||
mountPath: /config/runner.ini
|
||||
- name: cache
|
||||
mountPath: /opt/siriusdevops/runner/cache
|
||||
- name: siriusdevops
|
||||
mountPath: /opt/siriusdevops
|
||||
resources:
|
||||
requests:
|
||||
cpu: 50m
|
||||
memory: 128Mi
|
||||
limits:
|
||||
memory: 512Mi
|
||||
volumes:
|
||||
- name: docker-sock
|
||||
hostPath:
|
||||
path: /var/run/docker.sock
|
||||
type: Socket
|
||||
- name: docker-static
|
||||
hostPath:
|
||||
path: /usr/local/bin/docker-static
|
||||
type: File
|
||||
- name: cli-plugins
|
||||
hostPath:
|
||||
path: /opt/siriusdevops/runner/cli-plugins
|
||||
type: DirectoryOrCreate
|
||||
- name: config-toml
|
||||
configMap:
|
||||
name: forgejo-runner-config
|
||||
- name: runner-ini
|
||||
hostPath:
|
||||
path: /opt/siriusdevops/runner/config/runner.ini
|
||||
type: File
|
||||
- name: cache
|
||||
hostPath:
|
||||
path: /opt/siriusdevops/runner/cache
|
||||
type: DirectoryOrCreate
|
||||
- name: siriusdevops
|
||||
hostPath:
|
||||
path: /opt/siriusdevops
|
||||
type: Directory
|
||||
Loading…
Reference in a new issue