fix: try fixing the issue by ussing a deployment.yaml
This commit is contained in:
parent
b60d9de6a2
commit
5e766fe368
2 changed files with 74 additions and 23 deletions
74
apps/forgejo-runner/deployment.yaml
Normal file
74
apps/forgejo-runner/deployment.yaml
Normal file
|
|
@ -0,0 +1,74 @@
|
|||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: forgejo-runner
|
||||
namespace: forgejo
|
||||
labels:
|
||||
app: forgejo-runner
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: forgejo-runner
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: forgejo-runner
|
||||
spec:
|
||||
restartPolicy: Always
|
||||
volumes:
|
||||
- name: docker-certs
|
||||
emptyDir: {}
|
||||
- name: runner-data
|
||||
emptyDir: {}
|
||||
initContainers:
|
||||
- name: runner-config-generation
|
||||
image: code.forgejo.org/forgejo/runner:3.0.0
|
||||
command:
|
||||
[
|
||||
"sh",
|
||||
"-c",
|
||||
"forgejo-runner create-runner-file --instance $FORGEJO_INSTANCE_URL --secret $RUNNER_SECRET --connect"
|
||||
]
|
||||
env:
|
||||
- name: RUNNER_SECRET
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: forgejo-runner-token
|
||||
key: token
|
||||
- name: FORGEJO_INSTANCE_URL
|
||||
value: https://git.patanix.de
|
||||
volumeMounts:
|
||||
- name: runner-data
|
||||
mountPath: /data
|
||||
containers:
|
||||
- name: runner
|
||||
image: code.forgejo.org/forgejo/runner:3.0.0
|
||||
command:
|
||||
[
|
||||
"sh",
|
||||
"-c",
|
||||
"while ! nc -z localhost 2376 </dev/null; do echo 'waiting for docker daemon...'; sleep 5; done; forgejo-runner daemon"
|
||||
]
|
||||
env:
|
||||
- name: DOCKER_HOST
|
||||
value: tcp://localhost:2376
|
||||
- name: DOCKER_CERT_PATH
|
||||
value: /certs/client
|
||||
- name: DOCKER_TLS_VERIFY
|
||||
value: "1"
|
||||
volumeMounts:
|
||||
- name: docker-certs
|
||||
mountPath: /certs
|
||||
- name: runner-data
|
||||
mountPath: /data
|
||||
- name: daemon
|
||||
image: docker:23.0.6-dind
|
||||
env:
|
||||
- name: DOCKER_TLS_CERTDIR
|
||||
value: /certs
|
||||
securityContext:
|
||||
privileged: true
|
||||
volumeMounts:
|
||||
- name: docker-certs
|
||||
mountPath: /certs
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
apiVersion: helm.toolkit.fluxcd.io/v2beta2
|
||||
kind: HelmRelease
|
||||
metadata:
|
||||
name: forgejo-runner
|
||||
namespace: forgejo
|
||||
spec:
|
||||
interval: 15m
|
||||
chartRef:
|
||||
kind: OCIRepository
|
||||
name: forgejo-runner
|
||||
namespace: flux-system
|
||||
values:
|
||||
forgejo:
|
||||
url: "https://git.patanix.de"
|
||||
tokenSecretName: forgejo-runner-token
|
||||
dind:
|
||||
enabled: true
|
||||
# Optional: Runner-Name, Labels, Ressourcen etc.
|
||||
# name: "my-runner"
|
||||
# labels:
|
||||
# - "docker"
|
||||
# - "k8s"
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue