diff --git a/act-runner/config.yaml b/act-runner/config.yaml new file mode 100644 index 0000000..4812460 --- /dev/null +++ b/act-runner/config.yaml @@ -0,0 +1,8 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: act-runner-config + namespace: act-runner +data: + GITEA_INSTANCE_URL: "https://gitea.michaelthomson.dev" + GITEA_RUNNER_REGISTRATION_TOKEN: "PWwo9fPd5jFTdGi9LrUuWHFCXQi4xPosuQUpmQjX" diff --git a/act-runner/deployment.yaml b/act-runner/deployment.yaml new file mode 100644 index 0000000..10cf338 --- /dev/null +++ b/act-runner/deployment.yaml @@ -0,0 +1,27 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: act-runner + namespace: act-runner +spec: + selector: + matchLabels: + app: act-runner + template: + metadata: + labels: + app: act-runner + spec: + containers: + - name: act-runner + image: gitea/act_runner:nightly + envFrom: + - configMapRef: + name: act-runner-config + volumeMounts: + - name: data + mountPath: /data + volumes: + - name: data + persistentVolumeClaim: + claimName: data diff --git a/act-runner/pvc.yaml b/act-runner/pvc.yaml new file mode 100644 index 0000000..4690347 --- /dev/null +++ b/act-runner/pvc.yaml @@ -0,0 +1,12 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: data + namespace: act-runner +spec: + accessModes: + - ReadWriteOnce + storageClassName: longhorn + resources: + requests: + storage: 2Gi diff --git a/bootstrap/kustomizations/kustomization-act-runner.yaml b/bootstrap/kustomizations/kustomization-act-runner.yaml new file mode 100644 index 0000000..7a2ff4c --- /dev/null +++ b/bootstrap/kustomizations/kustomization-act-runner.yaml @@ -0,0 +1,18 @@ +apiVersion: kustomize.toolkit.fluxcd.io/v1 +kind: Kustomization +metadata: + name: act-runner + namespace: flux-system +spec: + interval: 15m + path: ./act-runner + prune: true # remove any elements later removed from the above path + timeout: 2m # if not set, this defaults to interval duration, which is 1h + sourceRef: + kind: GitRepository + name: flux-system + healthChecks: + - apiVersion: apps/v1 + kind: Deployment + name: act-runner + namespace: act-runner diff --git a/bootstrap/namespaces/namespace-act-runner.yaml b/bootstrap/namespaces/namespace-act-runner.yaml new file mode 100644 index 0000000..4ee2223 --- /dev/null +++ b/bootstrap/namespaces/namespace-act-runner.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: act-runner