1312be1a03
gitea-runner: add container.options to mount /usr/local/bin/kubectl:ro from the Legion host into every act_runner job container. Eliminates per-run curl download in CI workflows. ingress: change registry ingress hostname from registry.nook.family to registry.neuralplatform.ai. Matches the domain used in Neuron CI and neuron.yaml image reference. DNS CNAME + tunnel route already added.
76 lines
2.3 KiB
YAML
76 lines
2.3 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: gitea-runner
|
|
namespace: ci
|
|
labels:
|
|
app: gitea-runner
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: gitea-runner
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: gitea-runner
|
|
spec:
|
|
initContainers:
|
|
- name: register
|
|
image: gitea/act_runner:latest
|
|
workingDir: /data
|
|
command: ["/bin/sh", "-c"]
|
|
args:
|
|
- |
|
|
act_runner register \
|
|
--instance "$GITEA_INSTANCE_URL" \
|
|
--token "$GITEA_RUNNER_REGISTRATION_TOKEN" \
|
|
--name legion \
|
|
--labels "self-hosted:docker://ghcr.io/catthehacker/ubuntu:act-22.04,linux:docker://ghcr.io/catthehacker/ubuntu:act-22.04,x64:docker://ghcr.io/catthehacker/ubuntu:act-22.04,legion:docker://ghcr.io/catthehacker/ubuntu:act-22.04" \
|
|
--no-interactive
|
|
# Write runner config enabling docker socket passthrough for build jobs
|
|
cat > /data/config.yaml << 'EOF'
|
|
runner:
|
|
capacity: 2
|
|
envs: {}
|
|
timeout: 3h
|
|
container:
|
|
network: host
|
|
docker_host: "unix:///var/run/docker.sock"
|
|
force_pull: false
|
|
options: -v /usr/local/bin/kubectl:/usr/local/bin/kubectl:ro
|
|
EOF
|
|
envFrom:
|
|
- secretRef:
|
|
name: gitea-runner-secret
|
|
volumeMounts:
|
|
- name: data
|
|
mountPath: /data
|
|
containers:
|
|
- name: runner
|
|
image: gitea/act_runner:latest
|
|
workingDir: /data
|
|
command: ["act_runner", "daemon", "--config", "/data/config.yaml"]
|
|
envFrom:
|
|
- secretRef:
|
|
name: gitea-runner-secret
|
|
volumeMounts:
|
|
- name: data
|
|
mountPath: /data
|
|
- name: docker-sock
|
|
mountPath: /var/run/docker.sock
|
|
resources:
|
|
requests:
|
|
memory: 512Mi
|
|
cpu: 250m
|
|
limits:
|
|
memory: 4Gi
|
|
cpu: "4"
|
|
volumes:
|
|
- name: data
|
|
emptyDir: {}
|
|
- name: docker-sock
|
|
hostPath:
|
|
path: /var/run/docker.sock
|
|
type: Socket
|