feat: add ability to remove the .runner file within the helm chart (#126)
fix: https://gitea.com/gitea/helm-actions/issues/73 --------- Co-authored-by: DaanSelen <dselen@systemec.nl> Reviewed-on: https://gitea.com/gitea/helm-actions/pulls/126
This commit is contained in:
@@ -80,8 +80,9 @@ If `.Values.statefulset.dind.rootless: true` is set, then the following will be
|
|||||||
| `statefulset.actRunner.pullPolicy` | The Gitea act runner pullPolicy | `IfNotPresent` |
|
| `statefulset.actRunner.pullPolicy` | The Gitea act runner pullPolicy | `IfNotPresent` |
|
||||||
| `statefulset.actRunner.fullOverride` | Completely overrides the image registry, path/image, tag and digest. | `""` |
|
| `statefulset.actRunner.fullOverride` | Completely overrides the image registry, path/image, tag and digest. | `""` |
|
||||||
| `statefulset.actRunner.extraVolumeMounts` | Allows mounting extra volumes in the act runner container | `[]` |
|
| `statefulset.actRunner.extraVolumeMounts` | Allows mounting extra volumes in the act runner container | `[]` |
|
||||||
| `statefulset.actRunner.config` | Act runner custom configuration. See [Act Runner documentation](https://docs.gitea.com/usage/actions/act-runner#configuration) for details. | `Too complex. See values.yaml` |
|
|
||||||
| `statefulset.actRunner.extraEnvs` | Allows adding custom environment variables | `[]` |
|
| `statefulset.actRunner.extraEnvs` | Allows adding custom environment variables | `[]` |
|
||||||
|
| `statefulset.actRunner.flushCache` | whether to clear the .runner (cache) file by creating an extra init container, can slightly increase boot-up time | `false` |
|
||||||
|
| `statefulset.actRunner.config` | Act runner custom configuration. See [Act Runner documentation](https://docs.gitea.com/usage/actions/act-runner#configuration) for details. | `Too complex. See values.yaml` |
|
||||||
| `statefulset.dind.rootless` | a simple flag to let helm know we are dealing with a rootless dind container | `false` |
|
| `statefulset.dind.rootless` | a simple flag to let helm know we are dealing with a rootless dind container | `false` |
|
||||||
| `statefulset.dind.uid` | a field to set the running user id for the rootless dind container, so it knows where to look for the socket | `""` |
|
| `statefulset.dind.uid` | a field to set the running user id for the rootless dind container, so it knows where to look for the socket | `""` |
|
||||||
| `statefulset.dind.registry` | image registry, e.g. gcr.io,docker.io | `docker.io` |
|
| `statefulset.dind.registry` | image registry, e.g. gcr.io,docker.io | `docker.io` |
|
||||||
|
|||||||
@@ -49,6 +49,23 @@ spec:
|
|||||||
{{- if .Values.preExtraInitContainers }}
|
{{- if .Values.preExtraInitContainers }}
|
||||||
{{- toYaml .Values.preExtraInitContainers | nindent 8 }}
|
{{- toYaml .Values.preExtraInitContainers | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- if .Values.statefulset.actRunner.flushCache }}
|
||||||
|
- name: cache-flusher
|
||||||
|
image: "{{ include "gitea.actions.init.image" . }}"
|
||||||
|
command:
|
||||||
|
- sh
|
||||||
|
- -c
|
||||||
|
- |
|
||||||
|
if [[ -f /data/.runner ]]; then
|
||||||
|
echo "Removing cache at /data/.runner"
|
||||||
|
rm -v /data/.runner
|
||||||
|
else
|
||||||
|
echo "No .runner file to remove"
|
||||||
|
fi
|
||||||
|
volumeMounts:
|
||||||
|
- mountPath: /data
|
||||||
|
name: data-act-runner
|
||||||
|
{{- end }}
|
||||||
- name: init-gitea
|
- name: init-gitea
|
||||||
image: "{{ include "gitea.actions.init.image" . }}"
|
image: "{{ include "gitea.actions.init.image" . }}"
|
||||||
command:
|
command:
|
||||||
|
|||||||
+4
-1
@@ -26,8 +26,9 @@
|
|||||||
## @param statefulset.actRunner.pullPolicy The Gitea act runner pullPolicy
|
## @param statefulset.actRunner.pullPolicy The Gitea act runner pullPolicy
|
||||||
## @param statefulset.actRunner.fullOverride Completely overrides the image registry, path/image, tag and digest.
|
## @param statefulset.actRunner.fullOverride Completely overrides the image registry, path/image, tag and digest.
|
||||||
## @param statefulset.actRunner.extraVolumeMounts Allows mounting extra volumes in the act runner container
|
## @param statefulset.actRunner.extraVolumeMounts Allows mounting extra volumes in the act runner container
|
||||||
## @param statefulset.actRunner.config [default: Too complex. See values.yaml] Act runner custom configuration. See [Act Runner documentation](https://docs.gitea.com/usage/actions/act-runner#configuration) for details.
|
|
||||||
## @param statefulset.actRunner.extraEnvs Allows adding custom environment variables
|
## @param statefulset.actRunner.extraEnvs Allows adding custom environment variables
|
||||||
|
## @param statefulset.actRunner.flushCache whether to clear the .runner (cache) file by creating an extra init container, can slightly increase boot-up time
|
||||||
|
## @param statefulset.actRunner.config [default: Too complex. See values.yaml] Act runner custom configuration. See [Act Runner documentation](https://docs.gitea.com/usage/actions/act-runner#configuration) for details.
|
||||||
#
|
#
|
||||||
## @param statefulset.dind.rootless [default: false] a simple flag to let helm know we are dealing with a rootless dind container
|
## @param statefulset.dind.rootless [default: false] a simple flag to let helm know we are dealing with a rootless dind container
|
||||||
## @param statefulset.dind.uid a field to set the running user id for the rootless dind container, so it knows where to look for the socket
|
## @param statefulset.dind.uid a field to set the running user id for the rootless dind container, so it knows where to look for the socket
|
||||||
@@ -82,6 +83,8 @@ statefulset:
|
|||||||
# fieldRef:
|
# fieldRef:
|
||||||
# fieldPath: metadata.name
|
# fieldPath: metadata.name
|
||||||
|
|
||||||
|
# See full details: https://gitea.com/gitea/helm-actions/issues/73
|
||||||
|
flushCache: false
|
||||||
# See full example here: https://gitea.com/gitea/act_runner/src/branch/main/internal/pkg/config/config.example.yaml
|
# See full example here: https://gitea.com/gitea/act_runner/src/branch/main/internal/pkg/config/config.example.yaml
|
||||||
config: |
|
config: |
|
||||||
log:
|
log:
|
||||||
|
|||||||
Reference in New Issue
Block a user