docs: update kubernetes dind example

pull/123/head
xyhhx 2023-11-27 16:41:09 -05:00
parent d22ee0fb8e
commit 700a6de5bc
No known key found for this signature in database
GPG Key ID: 21955DADF87F80E8
1 changed files with 19 additions and 14 deletions

View File

@ -1,4 +1,5 @@
# Secret data.
# You will need to retrive this from the web UI, and your Forgejo instance must be running v1.21+
# Alternatively, create this with
# kubectl create secret generic runner-secret --from-literal=token=your_offline_token_here
apiVersion: v1
@ -36,17 +37,21 @@ spec:
# Initialise our configuration file using offline registration
# https://forgejo.org/docs/v1.21/admin/actions/#offline-registration
initContainers:
- name: runner-config-generation
image: code.forgejo.org/forgejo/runner:3.0.0
command: [ "forgejo-runner create-runner-file --instance $FORGEJO_INSTANCE_URL --secret $RUNNER_SECRET --connect" ]
- name: runner-register
image: code.forgejo.org/forgejo/runner:3.2.0
command: ["forgejo-runner", "register", "--no-interactive", "--token", $(RUNNER_SECRET), "--name", "runner", "--instance", $(FORGEJO_INSTANCE_URL)]
env:
- name: RUNNER_SECRET
valueFrom:
secretKeyRef:
name: runner-secret
name: forgejo-runner-secret
key: token
- name: FORGEJO_INSTANCE_URL
value: http://gitea-http.gitea.svc.cluster.local:3000
value: http://forgejo-http.forgejo.svc.cluster.local:3000
resources:
limits:
cpu: "0.50"
memory: "64Mi"
volumeMounts:
- name: runner-data
mountPath: /data