From fffddc9a39060c4acb7b17c53c49e977a242d9e0 Mon Sep 17 00:00:00 2001 From: William P Date: Sat, 7 Feb 2026 11:50:50 -0500 Subject: [PATCH] gitea-runner: integrate buildkit, migrate runner to statefulset --- gitea-runner/buildkitd/deployment.yaml | 40 +++++++++++++ gitea-runner/buildkitd/svc.yaml | 14 +++++ gitea-runner/deployment.yaml | 79 -------------------------- gitea-runner/pvc.yaml | 12 ---- gitea-runner/statefulset.yaml | 76 +++++++++++++++++++++++++ 5 files changed, 130 insertions(+), 91 deletions(-) create mode 100644 gitea-runner/buildkitd/deployment.yaml create mode 100644 gitea-runner/buildkitd/svc.yaml delete mode 100644 gitea-runner/deployment.yaml delete mode 100644 gitea-runner/pvc.yaml create mode 100644 gitea-runner/statefulset.yaml diff --git a/gitea-runner/buildkitd/deployment.yaml b/gitea-runner/buildkitd/deployment.yaml new file mode 100644 index 0000000..bfa84c1 --- /dev/null +++ b/gitea-runner/buildkitd/deployment.yaml @@ -0,0 +1,40 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: buildkitd + namespace: gitea-runner +spec: + progressDeadlineSeconds: 600 + replicas: 3 + revisionHistoryLimit: 10 + selector: + matchLabels: + app: buildkitd + strategy: + rollingUpdate: + maxSurge: 25% + maxUnavailable: 25% + type: RollingUpdate + template: + metadata: + labels: + app: buildkitd + spec: + containers: + - args: + - --addr + - tcp://0.0.0.0:1234 + image: moby/buildkit:v0.27.1 + imagePullPolicy: Always + name: buildkitd + ports: + - containerPort: 1234 + protocol: TCP + securityContext: + privileged: true + terminationMessagePath: /dev/termination-log + terminationMessagePolicy: File + dnsPolicy: ClusterFirst + restartPolicy: Always + schedulerName: default-scheduler + terminationGracePeriodSeconds: 30 \ No newline at end of file diff --git a/gitea-runner/buildkitd/svc.yaml b/gitea-runner/buildkitd/svc.yaml new file mode 100644 index 0000000..5aa6667 --- /dev/null +++ b/gitea-runner/buildkitd/svc.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: Service +metadata: + name: buildkitd + namespace: gitea-runner +spec: + internalTrafficPolicy: Cluster + ipFamilies: + - IPv4 + ipFamilyPolicy: SingleStack + ports: + - port: 1234 + selector: + app: buildkitd \ No newline at end of file diff --git a/gitea-runner/deployment.yaml b/gitea-runner/deployment.yaml deleted file mode 100644 index 9388db4..0000000 --- a/gitea-runner/deployment.yaml +++ /dev/null @@ -1,79 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - annotations: - deployment.kubernetes.io/revision: "4" - labels: - app: act-runner - name: act-runner - namespace: gitea-runner -spec: - progressDeadlineSeconds: 600 - replicas: 1 - revisionHistoryLimit: 10 - selector: - matchLabels: - app: act-runner - strategy: - rollingUpdate: - maxSurge: 25% - maxUnavailable: 25% - type: RollingUpdate - template: - metadata: - creationTimestamp: null - labels: - app: act-runner - spec: - containers: - - command: - - sh - - -c - - while ! nc -z localhost 2376