mirror of https://code.forgejo.org/forgejo/runner
Merge pull request 'docs: update kubernetes dind example' (#123) from xyhhx/runner:main into main
Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/123 Reviewed-by: earl-warren <earl-warren@noreply.code.forgejo.org>pull/125/head
commit
77ce39c2d3
|
@ -1,4 +1,5 @@
|
||||||
# Secret data.
|
# 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
|
# Alternatively, create this with
|
||||||
# kubectl create secret generic runner-secret --from-literal=token=your_offline_token_here
|
# kubectl create secret generic runner-secret --from-literal=token=your_offline_token_here
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
|
@ -36,20 +37,28 @@ spec:
|
||||||
# Initialise our configuration file using offline registration
|
# Initialise our configuration file using offline registration
|
||||||
# https://forgejo.org/docs/v1.21/admin/actions/#offline-registration
|
# https://forgejo.org/docs/v1.21/admin/actions/#offline-registration
|
||||||
initContainers:
|
initContainers:
|
||||||
- name: runner-config-generation
|
- name: runner-register
|
||||||
image: code.forgejo.org/forgejo/runner:3.0.0
|
image: code.forgejo.org/forgejo/runner:3.2.0
|
||||||
command: [ "forgejo-runner create-runner-file --instance $FORGEJO_INSTANCE_URL --secret $RUNNER_SECRET --connect" ]
|
command: ["forgejo-runner", "register", "--no-interactive", "--token", $(RUNNER_SECRET), "--name", $(RUNNER_NAME), "--instance", $(FORGEJO_INSTANCE_URL)]
|
||||||
env:
|
env:
|
||||||
- name: RUNNER_SECRET
|
- name: RUNNER_NAME
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
fieldRef:
|
||||||
name: runner-secret
|
fieldPath: metadata.name
|
||||||
key: token
|
- name: RUNNER_SECRET
|
||||||
- name: FORGEJO_INSTANCE_URL
|
valueFrom:
|
||||||
value: http://gitea-http.gitea.svc.cluster.local:3000
|
secretKeyRef:
|
||||||
volumeMounts:
|
name: forgejo-runner-secret
|
||||||
- name: runner-data
|
key: token
|
||||||
mountPath: /data
|
- name: FORGEJO_INSTANCE_URL
|
||||||
|
value: http://forgejo-http.forgejo.svc.cluster.local:3000
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: "0.50"
|
||||||
|
memory: "64Mi"
|
||||||
|
volumeMounts:
|
||||||
|
- name: runner-data
|
||||||
|
mountPath: /data
|
||||||
containers:
|
containers:
|
||||||
- name: runner
|
- name: runner
|
||||||
image: code.forgejo.org/forgejo/runner:3.0.0
|
image: code.forgejo.org/forgejo/runner:3.0.0
|
||||||
|
|
Loading…
Reference in New Issue