Revert CI to host Docker socket, remove buildkitd
BuildKit rootless failed on k3s (mount propagation), privileged mode fixed that but buildkitd gRPC is incompatible with the Docker REST API that forgejo-runner needs to manage job containers. Net security change vs. the original socket approach was zero (privileged ≈ socket access). Remove buildkitd.yaml entirely. Restore docker-sock hostPath mount on both runners. Builds work again.
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
---
|
||||
# Gitea CI runner — general-purpose (legion)
|
||||
# Docker socket REMOVED. Builds go through buildkitd TCP endpoint.
|
||||
# Set DOCKER_HOST=tcp://buildkitd.ci.svc.cluster.local:1234 in build steps.
|
||||
# Uses host Docker socket for container management and docker build/push.
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
@@ -19,7 +18,7 @@ spec:
|
||||
labels:
|
||||
app: gitea-runner
|
||||
annotations:
|
||||
config-version: "2026-04-25-buildkit-no-sock"
|
||||
config-version: "2026-04-26-docker-sock"
|
||||
spec:
|
||||
securityContext:
|
||||
runAsNonRoot: false # act_runner needs root for container management
|
||||
@@ -42,7 +41,7 @@ spec:
|
||||
timeout: 3h
|
||||
container:
|
||||
network: host
|
||||
docker_host: "tcp://buildkitd.ci.svc.cluster.local:1234"
|
||||
docker_host: "unix:///var/run/docker.sock"
|
||||
force_pull: false
|
||||
valid_volumes: []
|
||||
default_image: "registry.neuralplatform.ai/ci-base:latest"
|
||||
@@ -60,16 +59,14 @@ spec:
|
||||
image: registry.neuralplatform.ai/ci-base:latest
|
||||
workingDir: /data
|
||||
command: ["act_runner", "daemon", "--config", "/data/config.yaml"]
|
||||
env:
|
||||
- name: DOCKER_HOST
|
||||
value: "tcp://buildkitd.ci.svc.cluster.local:1234"
|
||||
envFrom:
|
||||
- secretRef:
|
||||
name: gitea-runner-secret
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /data
|
||||
# docker-sock volume intentionally removed — use buildkitd TCP instead
|
||||
- name: docker-sock
|
||||
mountPath: /var/run/docker.sock
|
||||
resources:
|
||||
requests:
|
||||
memory: 512Mi
|
||||
@@ -80,7 +77,10 @@ spec:
|
||||
volumes:
|
||||
- name: data
|
||||
emptyDir: {}
|
||||
# docker-sock hostPath intentionally removed
|
||||
- name: docker-sock
|
||||
hostPath:
|
||||
path: /var/run/docker.sock
|
||||
type: Socket
|
||||
---
|
||||
# Neuron Technologies CI runner
|
||||
apiVersion: apps/v1
|
||||
@@ -100,8 +100,10 @@ spec:
|
||||
labels:
|
||||
app: neuron-technologies-runner
|
||||
annotations:
|
||||
config-version: "2026-04-25-buildkit-no-sock"
|
||||
config-version: "2026-04-26-docker-sock"
|
||||
spec:
|
||||
securityContext:
|
||||
runAsNonRoot: false
|
||||
initContainers:
|
||||
- name: register
|
||||
image: registry.neuralplatform.ai/ci-base:latest
|
||||
@@ -121,7 +123,7 @@ spec:
|
||||
timeout: 3h
|
||||
container:
|
||||
network: host
|
||||
docker_host: "tcp://buildkitd.ci.svc.cluster.local:1234"
|
||||
docker_host: "unix:///var/run/docker.sock"
|
||||
force_pull: false
|
||||
valid_volumes: []
|
||||
default_image: "registry.neuralplatform.ai/ci-base:latest"
|
||||
@@ -139,15 +141,14 @@ spec:
|
||||
image: registry.neuralplatform.ai/ci-base:latest
|
||||
workingDir: /data
|
||||
command: ["act_runner", "daemon", "--config", "/data/config.yaml"]
|
||||
env:
|
||||
- name: DOCKER_HOST
|
||||
value: "tcp://buildkitd.ci.svc.cluster.local:1234"
|
||||
envFrom:
|
||||
- secretRef:
|
||||
name: neuron-technologies-runner-secret
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /data
|
||||
- name: docker-sock
|
||||
mountPath: /var/run/docker.sock
|
||||
resources:
|
||||
requests:
|
||||
memory: 512Mi
|
||||
@@ -158,3 +159,7 @@ spec:
|
||||
volumes:
|
||||
- name: data
|
||||
emptyDir: {}
|
||||
- name: docker-sock
|
||||
hostPath:
|
||||
path: /var/run/docker.sock
|
||||
type: Socket
|
||||
|
||||
Reference in New Issue
Block a user