From 087a76edb49a4ed9105df5005efbd28285ed4f55 Mon Sep 17 00:00:00 2001 From: djpbessems Date: Fri, 7 Jun 2024 21:59:09 +1000 Subject: [PATCH] Gitea runner volume configuration --- services/Gitea/configmap-runner-config.yaml | 8 ++++---- .../deployment-act-runner-dind-rootless.yaml | 5 +++++ services/Gitea/deployment-act-runner-dind.yaml | 7 +++++++ ...istentvolume-flexvolsmb-runner-scratch.yaml | 18 ++++++++++++++++++ ...tvolumeclaim-flexvolsmb-runner-scratch.yaml | 12 ++++++++++++ 5 files changed, 46 insertions(+), 4 deletions(-) create mode 100644 services/Gitea/persistentvolume-flexvolsmb-runner-scratch.yaml create mode 100644 services/Gitea/persistentvolumeclaim-flexvolsmb-runner-scratch.yaml diff --git a/services/Gitea/configmap-runner-config.yaml b/services/Gitea/configmap-runner-config.yaml index 4779e16..5aeedce 100644 --- a/services/Gitea/configmap-runner-config.yaml +++ b/services/Gitea/configmap-runner-config.yaml @@ -9,18 +9,18 @@ data: capacity: 2 labels: [dind:docker://node:21-bullseye] container: - options: "--add-host=docker:host-gateway -v /certs:/certs -v /data:/data -v /output:/output" + options: "--add-host=docker:host-gateway -v /certs:/certs -v /scratch:/scratch -v /output:/output" valid_volumes: - /certs - - /data + - /scratch - /output dind-rootless-config.yml: | runner: capacity: 2 labels: [dind-rootless:docker://node:21-bullseye] container: - options: "-v /certs:/certs -v /data:/data -v /output:/output" + options: "-v /certs:/certs -v /scratch:/scratch -v /output:/output" valid_volumes: - /certs - - /data + - /scratch - /output diff --git a/services/Gitea/deployment-act-runner-dind-rootless.yaml b/services/Gitea/deployment-act-runner-dind-rootless.yaml index 70e9b1e..50374c2 100644 --- a/services/Gitea/deployment-act-runner-dind-rootless.yaml +++ b/services/Gitea/deployment-act-runner-dind-rootless.yaml @@ -35,6 +35,9 @@ spec: - name: flexvolsmb-runner-output persistentVolumeClaim: claimName: flexvolsmb-runner-output + - name: flexvolsmb-runner-scratch + persistentVolumeClaim: + claimName: flexvolsmb-runner-scratch securityContext: fsGroup: 1000 containers: @@ -69,3 +72,5 @@ spec: subPath: dind-rootless-config.yml - name: flexvolsmb-runner-output mountPath: /output + - name: flexvolsmb-runner-scratch + mountPath: /scratch diff --git a/services/Gitea/deployment-act-runner-dind.yaml b/services/Gitea/deployment-act-runner-dind.yaml index 7f3fc9a..4111060 100644 --- a/services/Gitea/deployment-act-runner-dind.yaml +++ b/services/Gitea/deployment-act-runner-dind.yaml @@ -35,6 +35,9 @@ spec: - name: flexvolsmb-runner-output persistentVolumeClaim: claimName: flexvolsmb-runner-output + - name: flexvolsmb-runner-scratch + persistentVolumeClaim: + claimName: flexvolsmb-runner-scratch containers: - name: runner image: gitea/act_runner:nightly @@ -67,6 +70,8 @@ spec: mountPath: /data - name: flexvolsmb-runner-output mountPath: /output + - name: flexvolsmb-runner-scratch + mountPath: /scratch - name: daemon image: docker:26.1-dind args: @@ -81,3 +86,5 @@ spec: mountPath: /certs - name: flexvolsmb-runner-output mountPath: /output + - name: flexvolsmb-runner-scratch + mountPath: /scratch diff --git a/services/Gitea/persistentvolume-flexvolsmb-runner-scratch.yaml b/services/Gitea/persistentvolume-flexvolsmb-runner-scratch.yaml new file mode 100644 index 0000000..9670fc4 --- /dev/null +++ b/services/Gitea/persistentvolume-flexvolsmb-runner-scratch.yaml @@ -0,0 +1,18 @@ +apiVersion: v1 +kind: PersistentVolume +metadata: + name: flexvolsmb-runner-scratch +spec: + capacity: + storage: 50Gi + accessModes: + - ReadWriteMany + storageClassName: flexvolsmb-runner-scratch + flexVolume: + driver: mount/smb + secretRef: + name: flexvolsmb-credentials + options: + opts: file_mode=0777,dir_mode=0777,iocharset=utf8 + server: 192.168.154.225 + share: /K3s.Volumes/gitea/runner/scratch diff --git a/services/Gitea/persistentvolumeclaim-flexvolsmb-runner-scratch.yaml b/services/Gitea/persistentvolumeclaim-flexvolsmb-runner-scratch.yaml new file mode 100644 index 0000000..7c1bcc2 --- /dev/null +++ b/services/Gitea/persistentvolumeclaim-flexvolsmb-runner-scratch.yaml @@ -0,0 +1,12 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: flexvolsmb-runner-scratch + namespace: gitea +spec: + accessModes: + - ReadWriteMany + storageClassName: flexvolsmb-runner-scratch + resources: + requests: + storage: 50Gi