mirror of
https://github.com/SamyRai/turash.git
synced 2025-12-26 23:01:33 +00:00
Some checks failed
CI/CD Pipeline / frontend-build (push) Failing after 47s
CI/CD Pipeline / e2e-test (push) Has been skipped
CI/CD Pipeline / backend-lint (push) Failing after 30s
CI/CD Pipeline / backend-build (push) Has been skipped
CI/CD Pipeline / frontend-lint (push) Successful in 1m41s
- Replace buildah with Kaniko for optimal containerd compatibility - Kaniko is specifically designed for building in Kubernetes/containerd environments - No package installation needed - Kaniko runs in its own container - Maintains Harbor registry integration and caching capabilities - Simplifies runner deployment by removing package management Benefits: - Native containerd support (no Docker daemon needed) - No package installation in CI runners - Optimized for Kubernetes environments - Same Harbor registry functionality with cleaner architecture - Better resource usage than DinD approach
67 lines
1.9 KiB
YAML
67 lines
1.9 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: gitea-runner
|
|
namespace: gitea-runners
|
|
labels:
|
|
app: gitea-runner
|
|
spec:
|
|
replicas: 4
|
|
selector:
|
|
matchLabels:
|
|
app: gitea-runner
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: gitea-runner
|
|
spec:
|
|
containers:
|
|
- name: runner
|
|
image: gitea/act_runner:latest
|
|
command:
|
|
- sh
|
|
- -c
|
|
- |
|
|
apk add --no-cache nodejs npm || true
|
|
cd /data
|
|
if [ ! -f .runner ]; then
|
|
/usr/local/bin/act_runner register --instance "$GITEA_INSTANCE_URL" --token "$GITEA_RUNNER_REGISTRATION_TOKEN" --name "$GITEA_RUNNER_NAME" --labels "$GITEA_RUNNER_LABELS" --no-interactive || true
|
|
fi
|
|
exec /usr/local/bin/act_runner daemon
|
|
env:
|
|
- name: GITEA_INSTANCE_URL
|
|
value: "http://gitea.gitea.svc.cluster.local:3000"
|
|
- name: GITEA_RUNNER_REGISTRATION_TOKEN
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: gitea-runner-secret
|
|
key: GITEA_RUNNER_REGISTRATION_TOKEN
|
|
- name: GITEA_RUNNER_NAME
|
|
valueFrom:
|
|
fieldRef:
|
|
fieldPath: metadata.name
|
|
- name: GITEA_RUNNER_LABELS
|
|
value: "ubuntu-latest:host,ubuntu-22.04:host,ubuntu-20.04:host"
|
|
- name: ACT_RUNNER_CONFIG
|
|
value: "/data/.runner_config.yaml"
|
|
volumeMounts:
|
|
- name: runner-data
|
|
mountPath: /data
|
|
- name: runner-config
|
|
mountPath: /data/.runner_config.yaml
|
|
subPath: config.yaml
|
|
resources:
|
|
requests:
|
|
memory: "512Mi"
|
|
cpu: "250m"
|
|
limits:
|
|
memory: "2Gi"
|
|
cpu: "2000m"
|
|
volumes:
|
|
- name: runner-data
|
|
emptyDir: {}
|
|
- name: runner-config
|
|
configMap:
|
|
name: gitea-runner-config
|
|
dnsPolicy: ClusterFirst
|