2023-11-14 21:12:33 +00:00
|
|
|
---
|
|
|
|
apiVersion: apps/v1
|
|
|
|
kind: StatefulSet
|
|
|
|
metadata:
|
2023-11-30 07:52:03 +00:00
|
|
|
name: act-runner-amd64
|
2023-11-14 21:12:33 +00:00
|
|
|
spec:
|
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
app.kubernetes.io/name: act-runner
|
2023-11-30 07:52:03 +00:00
|
|
|
app.kubernetes.io/instance: amd64
|
2023-11-14 21:12:33 +00:00
|
|
|
serviceName: act-runner
|
2023-11-30 07:52:03 +00:00
|
|
|
replicas: 1
|
2023-11-14 21:12:33 +00:00
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
app.kubernetes.io/name: act-runner
|
2023-11-30 07:52:03 +00:00
|
|
|
app.kubernetes.io/instance: amd64
|
2023-11-14 21:12:33 +00:00
|
|
|
spec:
|
|
|
|
restartPolicy: Always
|
|
|
|
initContainers:
|
|
|
|
- name: runner-registration
|
|
|
|
image: docker.io/alpine:3.18
|
|
|
|
command:
|
|
|
|
- /bin/ash
|
|
|
|
- -c
|
|
|
|
- "cp /etc/act/`hostname` /data/.runner"
|
|
|
|
volumeMounts:
|
|
|
|
- name: runner-data
|
|
|
|
mountPath: /data
|
|
|
|
- name: runner-registrations
|
|
|
|
mountPath: /etc/act
|
|
|
|
containers:
|
|
|
|
- name: runner
|
|
|
|
image: act_runner
|
|
|
|
imagePullPolicy: Always
|
2023-11-17 07:18:15 +00:00
|
|
|
command: ["sh", "-c", "while ! nc -z localhost 2376 </dev/null; do echo 'waiting for docker daemon...'; sleep 5; done; /sbin/tini -- /opt/act/run.sh"]
|
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"
|
2023-11-17 07:18:15 +00:00
|
|
|
- name: CONFIG_FILE
|
|
|
|
value: /etc/act/config.yaml
|
2023-11-14 21:12:33 +00:00
|
|
|
volumeMounts:
|
2023-11-17 07:18:15 +00:00
|
|
|
- name: runner-data
|
|
|
|
mountPath: /data
|
|
|
|
- name: runner-config
|
|
|
|
mountPath: /etc/act
|
|
|
|
- name: docker-certs
|
|
|
|
mountPath: /certs
|
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
|
2023-11-14 21:12:33 +00:00
|
|
|
securityContext:
|
|
|
|
fsGroup: 1000
|
|
|
|
affinity:
|
|
|
|
nodeAffinity:
|
|
|
|
requiredDuringSchedulingIgnoredDuringExecution:
|
|
|
|
nodeSelectorTerms:
|
|
|
|
- matchExpressions:
|
|
|
|
- key: kubernetes.io/arch
|
|
|
|
operator: In
|
|
|
|
values:
|
2023-11-30 07:52:03 +00:00
|
|
|
- amd64
|
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:
|
2023-11-30 07:52:03 +00:00
|
|
|
name: act-runner-config-amd64
|
2023-11-14 21:12:33 +00:00
|
|
|
- name: runner-registrations
|
|
|
|
secret:
|
|
|
|
secretName: runner-registrations
|