# --- ConfigMap for the AMD64 Runner --- apiVersion: v1 kind: ConfigMap metadata: name: gitea-runner-amd64-config namespace: dev data: config.yaml: | # Registration token and Gitea instance URL should be managed via secrets runner: capacity: 4 timeout: 1h labels: - "ubuntu-amd64:docker://docker.gitea.com/runner-images:ubuntu-latest" - "ubuntu-latest:docker://docker.gitea.com/runner-images:ubuntu-latest" - "ubuntu-slim:docker://docker.gitea.com/runner-images:ubuntu-latest-slim" --- # --- ConfigMap for the ARM64 Runner --- apiVersion: v1 kind: ConfigMap metadata: name: gitea-runner-arm64-config namespace: dev data: config.yaml: | runner: capacity: 4 timeout: 1h labels: - "ubuntu-arm64:docker://docker.gitea.com/runner-images:ubuntu-latest" --- # PersistentVolumeClaim for AMD64 apiVersion: v1 kind: PersistentVolumeClaim metadata: name: gitea-runner-amd64-pvc namespace: dev annotations: nfs.io/storage-path: "gitea-runner-amd64-pvc" spec: storageClassName: "nfs-client" accessModes: - ReadWriteMany resources: requests: storage: 8Mi --- # PersistentVolumeClaim for ARM64 apiVersion: v1 kind: PersistentVolumeClaim metadata: name: gitea-runner-arm64-pvc namespace: dev annotations: nfs.io/storage-path: "gitea-runner-arm64-pvc" spec: storageClassName: "nfs-client" accessModes: - ReadWriteMany resources: requests: storage: 8Mi --- # --- Deployment for the AMD64 Runner --- apiVersion: apps/v1 kind: Deployment metadata: name: gitea-runner-amd64 namespace: dev spec: replicas: 1 selector: matchLabels: app: gitea-runner-amd64 template: metadata: labels: app: gitea-runner-amd64 spec: containers: - name: gitea-runner image: gitea/act_runner:latest imagePullPolicy: Always volumeMounts: - name: config-volume mountPath: /etc/gitea-runner/config.yaml subPath: config.yaml - name: docker-socket mountPath: /var/run/docker.sock - name: gitea-runner-amd64-pvc mountPath: /data env: - name: GITEA_RUNNER_REGISTRATION_TOKEN valueFrom: secretKeyRef: name: gitea-runner-token key: REGISTRATION_TOKEN - name: GITEA_INSTANCE_URL value: https://git.ivanch.me - name: GITEA_RUNNER_NAME value: k8s-runner-amd64 - name: CONFIG_FILE value: /etc/gitea-runner/config.yaml volumes: - name: config-volume configMap: name: gitea-runner-amd64-config - name: docker-socket hostPath: path: /var/run/docker.sock - name: gitea-runner-amd64-pvc persistentVolumeClaim: claimName: gitea-runner-amd64-pvc affinity: nodeAffinity: requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: - matchExpressions: - key: kubernetes.io/hostname operator: In values: - iris --- # --- Deployment for the ARM64 Runner --- apiVersion: apps/v1 kind: Deployment metadata: name: gitea-runner-arm64 namespace: dev spec: replicas: 1 selector: matchLabels: app: gitea-runner-arm64 template: metadata: labels: app: gitea-runner-arm64 spec: containers: - name: gitea-runner image: gitea/act_runner:latest imagePullPolicy: Always volumeMounts: - name: config-volume mountPath: /etc/gitea-runner/config.yaml subPath: config.yaml - name: docker-socket mountPath: /var/run/docker.sock - name: gitea-runner-arm64-pvc mountPath: /data env: - name: GITEA_RUNNER_REGISTRATION_TOKEN valueFrom: secretKeyRef: name: gitea-runner-token key: REGISTRATION_TOKEN - name: GITEA_INSTANCE_URL value: https://git.ivanch.me - name: GITEA_RUNNER_NAME value: k8s-runner-arm64 - name: CONFIG_FILE value: /etc/gitea-runner/config.yaml volumes: - name: config-volume configMap: name: gitea-runner-arm64-config - name: docker-socket hostPath: path: /var/run/docker.sock - name: gitea-runner-arm64-pvc persistentVolumeClaim: claimName: gitea-runner-arm64-pvc affinity: nodeAffinity: requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: - matchExpressions: - key: kubernetes.io/hostname operator: In values: - nexus