feat: support native Kubernetes runner jobs (#194)

### Description of the change

Make DinD optional and add opt-in ServiceAccount/RBAC creation for native Kubernetes jobs. Preserve Docker defaults and compatibility with reused Helm values.

### Benefits

Deploy Kubernetes jobs through the existing chart, with support for mixed backend labels.

### Possible drawbacks

Requires matching runner configuration. Docker container actions remain unsupported by the upstream Kubernetes backend.

### Additional information

Validated with 61 Helm tests, lint, packaging, and kind: six concurrent jobs, checkout/services, artifacts/cache, cleanup, restarts and backend upgrades. Manual validation completed.

### Checklist

- [x] Parameters documented in values.yaml and generated README.md
- [x] Helm templating unit tests added
- [x] New resources render metadata.namespace

Reviewed-on: https://gitea.com/gitea/helm-actions/pulls/194
Reviewed-by: DaanSelen <[email protected]>
Reviewed-by: Lunny Xiao <[email protected]>
Co-authored-by: James Tatum <[email protected]>
This commit is contained in:
James Tatum
2026-11-22 10:08:59 +00:00
committed by bircni
parent d0cf871b74
commit 5039cb180b
11 changed files with 617 additions and 4 deletions
+9 -1
View File
@@ -5,6 +5,8 @@
## @descriptionEnd
#
## @param enabled Create a Gitea Runner StatefulSet.
## @param serviceAccount.create Create a service account for the runner. Uses statefulset.serviceAccountName or a generated name.
## @param rbac.create Create namespace-scoped permissions for Kubernetes job pods. Requires a created or explicitly named service account.
## @param statefulset.replicas the amount of (replica) runner pods deployed
## @param statefulset.timezone is the timezone that will be set in the runner image
## @param statefulset.annotations Gitea Runner annotations
@@ -16,7 +18,7 @@
## @param statefulset.extraVolumes Extra volumes for the statefulset
## @param statefulset.persistence.size Size for persistence to store Gitea Runner data
## @param statefulset.securityContext Customize the SecurityContext
## @param statefulset.serviceAccountName Customize the service account name
## @param statefulset.serviceAccountName Name of the runner service account. When serviceAccount.create is false, the account must already exist.
## @param statefulset.runtimeClassName Select a different RuntimeClass for pods
## @param statefulset.hostAliases Inject entries into the /etc/hosts file
#
@@ -34,6 +36,7 @@
## @param statefulset.runner.flushCache whether to clear the .runner (cache) file by creating an extra init container, can slightly increase boot-up time
## @param statefulset.runner.config [default: Too complex. See values.yaml] Gitea Runner custom configuration. See [Gitea Runner documentation](https://docs.gitea.com/usage/actions/act-runner#configuration) for details.
#
## @param statefulset.dind.enabled Deploy the Docker-in-Docker sidecar and mount its socket in the runner. Disable for Kubernetes-only runners.
## @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.registry image registry, e.g. gcr.io,docker.io
@@ -48,6 +51,10 @@
## @param statefulset.dind.extraArgs Allows adding custom arguments to the Docker Daemon
#
enabled: false
serviceAccount:
create: false
rbac:
create: false
statefulset:
replicas: 1
timezone: Etc/UTC
@@ -102,6 +109,7 @@ statefulset:
docker_timeout: 300s
dind:
enabled: true
rootless: false
uid: ""
registry: "docker.io"