2023-11-14 21:12:33 +00:00
|
|
|
---
|
|
|
|
apiVersion: apps/v1
|
2024-02-22 15:06:41 +00:00
|
|
|
kind: Deployment
|
2023-11-14 21:12:33 +00:00
|
|
|
metadata:
|
|
|
|
name: act-runner-arm64
|
|
|
|
spec:
|
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
app.kubernetes.io/name: act-runner
|
2023-11-30 07:52:03 +00:00
|
|
|
app.kubernetes.io/instance: arm64
|
2023-11-14 21:12:33 +00:00
|
|
|
replicas: 2
|
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
app.kubernetes.io/name: act-runner
|
2023-11-30 07:52:03 +00:00
|
|
|
app.kubernetes.io/instance: arm64
|
2023-11-14 21:12:33 +00:00
|
|
|
spec:
|
|
|
|
restartPolicy: Always
|
2024-02-22 15:06:41 +00:00
|
|
|
# Initialise our configuration file using offline registration
|
|
|
|
# https://forgejo.org/docs/v1.21/admin/actions/#offline-registration
|
2023-11-14 21:12:33 +00:00
|
|
|
initContainers:
|
2024-02-22 15:06:41 +00:00
|
|
|
- name: runner-register
|
|
|
|
image: act_runner
|
|
|
|
command: ["forgejo-runner"]
|
|
|
|
args:
|
|
|
|
- "register"
|
|
|
|
- "--no-interactive"
|
|
|
|
- "--token"
|
|
|
|
- $(RUNNER_SECRET)
|
|
|
|
- "--name"
|
|
|
|
- $(RUNNER_NAME)
|
|
|
|
- "--instance"
|
|
|
|
- $(FORGEJO_INSTANCE_URL)
|
|
|
|
- "--labels"
|
|
|
|
- "docker:docker://code.icb4dc0.de/infrastructure/images/act_runtime:arm64,ubuntu-latest:docker://code.icb4dc0.de/infrastructure/images/act_runtime:arm64,ubuntu-22.04:docker://code.icb4dc0.de/infrastructure/images/act_runtime:arm64,ubuntu-20.04:docker://code.icb4dc0.de/infrastructure/images/act_runtime:20.04-arm64"
|
|
|
|
|
|
|
|
env:
|
|
|
|
- name: RUNNER_NAME
|
|
|
|
valueFrom:
|
|
|
|
fieldRef:
|
|
|
|
fieldPath: metadata.name
|
|
|
|
- name: RUNNER_SECRET
|
|
|
|
valueFrom:
|
|
|
|
secretKeyRef:
|
|
|
|
name: forgejo-runner-secret
|
|
|
|
key: token
|
|
|
|
- name: FORGEJO_INSTANCE_URL
|
|
|
|
value: http://forgejo-http.forgejo.svc.cluster.local:3000
|
|
|
|
resources:
|
|
|
|
limits:
|
|
|
|
cpu: "0.50"
|
|
|
|
memory: "64Mi"
|
2023-11-14 21:12:33 +00:00
|
|
|
volumeMounts:
|
2024-02-22 15:06:41 +00:00
|
|
|
- name: runner-data
|
|
|
|
mountPath: /data
|
2023-11-14 21:12:33 +00:00
|
|
|
containers:
|
|
|
|
- name: runner
|
|
|
|
image: act_runner
|
|
|
|
imagePullPolicy: Always
|
2024-02-22 15:06:41 +00:00
|
|
|
command: ["sh", "-c", "while ! nc -z localhost 2376 </dev/null; do echo 'waiting for docker daemon...'; sleep 5; done; forgejo-runner daemon --config /etc/act/config.yaml"]
|
2023-11-14 21:12:33 +00:00
|
|
|
env:
|
|
|
|
- name: DOCKER_HOST
|
|
|
|
value: tcp://localhost:2376
|
|
|
|
- name: DOCKER_CERT_PATH
|
|
|
|
value: /certs/client
|
|
|
|
- name: DOCKER_TLS_VERIFY
|
|
|
|
value: "1"
|
|
|
|
volumeMounts:
|
2023-11-17 07:18:15 +00:00
|
|
|
- name: runner-data
|
|
|
|
mountPath: /data
|
|
|
|
- name: docker-certs
|
|
|
|
mountPath: /certs
|
2024-02-22 15:06:41 +00:00
|
|
|
- name: runner-config
|
|
|
|
mountPath: /etc/act
|
2023-11-14 21:12:33 +00:00
|
|
|
securityContext:
|
|
|
|
privileged: true
|
2023-11-17 07:18:15 +00:00
|
|
|
- name: daemon
|
|
|
|
image: docker:23.0.6-dind
|
|
|
|
env:
|
|
|
|
- name: DOCKER_TLS_CERTDIR
|
|
|
|
value: /certs
|
|
|
|
securityContext:
|
|
|
|
privileged: true
|
|
|
|
volumeMounts:
|
|
|
|
- name: docker-certs
|
|
|
|
mountPath: /certs
|
2024-02-22 15:06:41 +00:00
|
|
|
- name: runner-data
|
|
|
|
mountPath: /data
|
2023-11-14 21:12:33 +00:00
|
|
|
securityContext:
|
|
|
|
fsGroup: 1000
|
2024-05-08 13:01:27 +00:00
|
|
|
nodeSelector:
|
|
|
|
kubernetes.io/arch: arm64
|
2023-11-14 21:12:33 +00:00
|
|
|
affinity:
|
2024-05-08 13:01:27 +00:00
|
|
|
podAntiAffinity:
|
2023-11-14 21:12:33 +00:00
|
|
|
requiredDuringSchedulingIgnoredDuringExecution:
|
2024-05-08 13:01:27 +00:00
|
|
|
- topologyKey: kubernetes.io/hostname
|
|
|
|
labelSelector:
|
|
|
|
matchExpressions:
|
|
|
|
- key: app.kubernetes.io/name
|
2023-11-14 21:12:33 +00:00
|
|
|
operator: In
|
|
|
|
values:
|
2024-05-08 13:01:27 +00:00
|
|
|
- act-runner
|
2023-11-14 21:12:33 +00:00
|
|
|
volumes:
|
|
|
|
- name: runner-data
|
|
|
|
emptyDir:
|
|
|
|
sizeLimit: 500Mi
|
2023-11-17 07:18:15 +00:00
|
|
|
- name: docker-certs
|
|
|
|
emptyDir:
|
|
|
|
sizeLimit: 5Mi
|
|
|
|
- name: runner-config
|
|
|
|
configMap:
|
2024-02-22 15:06:41 +00:00
|
|
|
name: act-runner-config-arm64
|