mirror of
https://gitea.com/gitea/helm-actions.git
synced 2026-12-01 17:07:50 +00:00
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:
@@ -56,6 +56,10 @@ stringData:
|
||||
runner-token: "my-cool-runner-token-given-by-gitea"
|
||||
```
|
||||
|
||||
### Native Kubernetes jobs
|
||||
|
||||
The default backend uses Docker-in-Docker. To run each job as a Kubernetes pod, see the [Kubernetes configuration guide](./docs/kubernetes.md).
|
||||
|
||||
### Rootless Options
|
||||
|
||||
If `.Values.statefulset.dind.rootless: true` is set, then the following will be required:
|
||||
@@ -70,6 +74,8 @@ For resource limit examples (runner vs DinD), see [docs/resources.md](./docs/res
|
||||
| Name | Description | Value |
|
||||
| -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------ |
|
||||
| `enabled` | Create a Gitea Runner StatefulSet. | `false` |
|
||||
| `serviceAccount.create` | Create a service account for the runner. Uses statefulset.serviceAccountName or a generated name. | `false` |
|
||||
| `rbac.create` | Create namespace-scoped permissions for Kubernetes job pods. Requires a created or explicitly named service account. | `false` |
|
||||
| `statefulset.replicas` | the amount of (replica) runner pods deployed | `1` |
|
||||
| `statefulset.timezone` | is the timezone that will be set in the runner image | `Etc/UTC` |
|
||||
| `statefulset.annotations` | Gitea Runner annotations | `{}` |
|
||||
@@ -81,7 +87,7 @@ For resource limit examples (runner vs DinD), see [docs/resources.md](./docs/res
|
||||
| `statefulset.extraVolumes` | Extra volumes for the statefulset | `[]` |
|
||||
| `statefulset.persistence.size` | Size for persistence to store Gitea Runner data | `1Gi` |
|
||||
| `statefulset.securityContext` | Customize the SecurityContext | `{}` |
|
||||
| `statefulset.serviceAccountName` | Customize the service account name | `""` |
|
||||
| `statefulset.serviceAccountName` | Name of the runner service account. When serviceAccount.create is false, the account must already exist. | `""` |
|
||||
| `statefulset.runtimeClassName` | Select a different RuntimeClass for pods | `""` |
|
||||
| `statefulset.hostAliases` | Inject entries into the /etc/hosts file | `[]` |
|
||||
| `statefulset.persistence.size` | Size for persistence to store Gitea Runner data | `1Gi` |
|
||||
@@ -96,6 +102,7 @@ For resource limit examples (runner vs DinD), see [docs/resources.md](./docs/res
|
||||
| `statefulset.runner.extraEnvs` | Allows adding custom environment variables | `[]` |
|
||||
| `statefulset.runner.flushCache` | whether to clear the .runner (cache) file by creating an extra init container, can slightly increase boot-up time | `false` |
|
||||
| `statefulset.runner.config` | Gitea Runner custom configuration. See [Gitea Runner documentation](https://docs.gitea.com/usage/actions/act-runner#configuration) for details. | `Too complex. See values.yaml` |
|
||||
| `statefulset.dind.enabled` | Deploy the Docker-in-Docker sidecar and mount its socket in the runner. Disable for Kubernetes-only runners. | `true` |
|
||||
| `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.registry` | image registry, e.g. gcr.io,docker.io | `docker.io` |
|
||||
|
||||
Reference in New Issue
Block a user