From bf978cf72815db92bb4184f577bd03177fddc6ad Mon Sep 17 00:00:00 2001 From: Jack Jackson Date: Fri, 4 Apr 2025 17:18:22 +0000 Subject: [PATCH] feat: allow parameterization of Act Runners persistence (#3) See [original implementation](https://gitea.com/gitea/helm-gitea/pulls/812). Co-authored-by: Lunny Xiao Co-authored-by: ChristopherHX Reviewed-on: https://gitea.com/gitea/helm-actions/pulls/3 Reviewed-by: ChristopherHX Reviewed-by: Lunny Xiao Co-authored-by: Jack Jackson Co-committed-by: Jack Jackson --- README.md | 1 + templates/statefulset.yaml | 2 +- values.yaml | 4 ++++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index f41ac2a..d9487fa 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,7 @@ If `.Values.image.rootless: true`, then the following will occur. In case you us | `statefulset.dind.pullPolicy` | The Docker-in-Docker pullPolicy | `IfNotPresent` | | `statefulset.dind.extraVolumeMounts` | Allows mounting extra volumes in the Docker-in-Docker container | `[]` | | `statefulset.dind.extraEnvs` | Allows adding custom environment variables, such as `DOCKER_IPTABLES_LEGACY` | `[]` | +| `statefulset.persistence.size` | Size for persistence to store act runner data | `1Gi` | | `provisioning.enabled` | Create a job that will create and save the token in a Kubernetes Secret | `false` | | `provisioning.annotations` | Job's annotations | `{}` | | `provisioning.labels` | Job's labels | `{}` | diff --git a/templates/statefulset.yaml b/templates/statefulset.yaml index 1beff11..d89540c 100644 --- a/templates/statefulset.yaml +++ b/templates/statefulset.yaml @@ -125,5 +125,5 @@ spec: {{- include "gitea.persistence.storageClass" . | nindent 8 }} resources: requests: - storage: 1Mi + storage: {{ .Values.statefulset.persistence.size }} {{- end }} diff --git a/values.yaml b/values.yaml index 54396b9..ab97400 100644 --- a/values.yaml +++ b/values.yaml @@ -22,6 +22,7 @@ ## @param statefulset.dind.pullPolicy The Docker-in-Docker pullPolicy ## @param statefulset.dind.extraVolumeMounts Allows mounting extra volumes in the Docker-in-Docker container ## @param statefulset.dind.extraEnvs Allows adding custom environment variables, such as `DOCKER_IPTABLES_LEGACY` +## @param statefulset.persistence.size Size for persistence to store act runner data ## @param provisioning.enabled Create a job that will create and save the token in a Kubernetes Secret ## @param provisioning.annotations Job's annotations ## @param provisioning.labels Job's labels @@ -72,6 +73,9 @@ statefulset: # - name: "DOCKER_IPTABLES_LEGACY" # value: "1" + persistence: + size: 1Gi + init: image: repository: busybox