theshire/kubernetes/apps/ci-runners/forgejo/app/helmrelease.yaml

104 lines
3 KiB
YAML
Raw Normal View History

2024-05-20 07:56:58 -05:00
---
# yaml-language-server: $schema=https://raw.githubusercontent.com/bjw-s/helm-charts/main/charts/other/app-template/schemas/helmrelease-helm-v2beta2.schema.json
apiVersion: helm.toolkit.fluxcd.io/v2
2024-05-20 07:56:58 -05:00
kind: HelmRelease
metadata:
name: &app forgejo-runner
spec:
interval: 30m
chart:
spec:
chart: app-template
version: 3.2.1
2024-05-20 07:56:58 -05:00
sourceRef:
kind: HelmRepository
name: bjw-s
namespace: flux-system
install:
remediation:
retries: 3
upgrade:
cleanupOnFail: true
remediation:
retries: 3
strategy: rollback
values:
controllers:
forgejo-runner:
replicas: 2
initContainers:
runner-register:
image:
repository: code.forgejo.org/forgejo/runner
tag: 3.5.0
2024-05-20 07:56:58 -05:00
command:
- "forgejo-runner"
- "register"
- "--no-interactive"
- "--token"
- $(RUNNER_TOKEN)
- "--name"
- $(RUNNER_NAME)
- "--instance"
- $(FORGEJO_INSTANCE_URL)
2024-05-20 08:30:32 -05:00
- "--labels"
2024-05-20 22:32:01 -05:00
- "docker:docker://node:20-bullseye,x86_64:docker://node:20-bullseye,linux:docker://node:20-bullseye,pc:docker://node:20-bullseye,ubuntu-x86_64:docker://node:20-bullseye"
2024-05-20 07:56:58 -05:00
env:
- name: RUNNER_NAME
valueFrom:
secretKeyRef:
2024-05-20 08:09:25 -05:00
name: forgejo-runner-secret
2024-05-20 07:56:58 -05:00
key: RUNNER_NAME
- name: RUNNER_TOKEN
valueFrom:
secretKeyRef:
2024-05-20 08:09:25 -05:00
name: forgejo-runner-secret
2024-05-20 07:56:58 -05:00
key: RUNNER_TOKEN
- name: FORGEJO_INSTANCE_URL
valueFrom:
secretKeyRef:
2024-05-20 08:09:25 -05:00
name: forgejo-runner-secret
2024-05-20 07:56:58 -05:00
key: FORGEJO_INSTANCE_URL
containers:
daemon:
image:
repository: docker
tag: 26.1.4-dind
2024-05-20 07:56:58 -05:00
securityContext:
privileged: true
env:
- name: DOCKER_TLS_CERTDIR
value: /certs
app:
image:
repository: code.forgejo.org/forgejo/runner
tag: 3.5.0
2024-05-20 07:56:58 -05:00
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"
annotations:
reloader.stakater.com/auto: "true"
service:
app:
controller: forgejo-runner
ports:
http:
port: 45315
persistence:
docker-certs:
2024-05-20 08:03:26 -05:00
type: emptyDir
globalMounts:
- path: /certs
2024-05-20 07:56:58 -05:00
runner-data:
type: emptyDir
globalMounts:
- path: /data