Add Gitea act-runner and fix ddclient deployment
- gitea-runner.tf: Secret for Gitea runner registration token - apps/gitea-runner.yaml: Gitea act-runner deployment (init container registers with Gitea, main container runs daemon) — serves all Gitea Actions CI jobs on self-hosted,linux,x64,legion labels - variables.tf: Add gitea_runner_token variable - ddclient.tf: Switch to official ghcr.io/ddclient/ddclient image, remove linuxserver wrapper that was exhausting inotify instances
This commit is contained in:
@@ -0,0 +1,61 @@
|
||||
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
|
||||
command: ["/bin/sh", "-c"]
|
||||
args:
|
||||
- |
|
||||
act_runner register \
|
||||
--instance "$GITEA_INSTANCE_URL" \
|
||||
--token "$GITEA_RUNNER_REGISTRATION_TOKEN" \
|
||||
--name legion \
|
||||
--labels self-hosted,linux,x64,legion \
|
||||
--no-interactive
|
||||
envFrom:
|
||||
- secretRef:
|
||||
name: gitea-runner-secret
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /data
|
||||
containers:
|
||||
- name: runner
|
||||
image: gitea/act_runner:latest
|
||||
command: ["act_runner", "daemon"]
|
||||
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
|
||||
Reference in New Issue
Block a user