feat(forgejo-runner): Added a separate setting for tune dind resources

This commit is contained in:
Andrey Kitsul 2025-02-26 17:25:03 +07:00 committed by WrenIX
parent 46ad35ae44
commit c376e4b8ee
Signed by: wrenix
GPG key ID: 7AFDB012974B1BB5
4 changed files with 56 additions and 22 deletions

View file

@ -2,7 +2,7 @@ apiVersion: v2
name: forgejo-runner
description: Deploy runner for an forgejo instance (default codeberg.org)
type: application
version: "0.4.15"
version: "0.4.16"
# renovate: image=code.forgejo.org/forgejo/runner
appVersion: "6.2.2"
maintainers:

View file

@ -7,7 +7,7 @@ description: "Deploy runner for an forgejo instance (default codeberg.org)"
# forgejo-runner
![Version: 0.4.15](https://img.shields.io/badge/Version-0.4.15-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 6.2.2](https://img.shields.io/badge/AppVersion-6.2.2-informational?style=flat-square)
![Version: 0.4.16](https://img.shields.io/badge/Version-0.4.16-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 6.2.2](https://img.shields.io/badge/AppVersion-6.2.2-informational?style=flat-square)
Deploy runner for an forgejo instance (default codeberg.org)
@ -76,6 +76,16 @@ helm uninstall forgejo-runner-release
## Values
### Docker in Docker
| Key | Type | Default | Description |
|-----|------|---------|-------------|
| dind.image.pullPolicy | string | `"IfNotPresent"` | pull policy |
| dind.image.registry | string | `"docker.io"` | image registry |
| dind.image.repository | string | `"library/docker"` | image repository |
| dind.image.tag | string | `"28.0.0-dind"` | image tag |
| dind.resources | object | `{}` | We usually recommend not to specify default resources and to leave this as a conscious choice for the user. This also increases chances charts run on environments with little resources, such as Minikube. If you do want to specify resources, uncomment the following lines, adjust them as necessary, and remove the curly braces after 'resources:'. limits: cpu: 100m memory: 128Mi requests: cpu: 100m memory: 128Mi |
### Configuration yaml of runner (see: https://code.forgejo.org/forgejo/runner/src/branch/main/internal/pkg/config/config.example.yaml)
| Key | Type | Default | Description |
@ -116,16 +126,12 @@ helm uninstall forgejo-runner-release
| autoscaling.maxReplicas | int | `100` | |
| autoscaling.minReplicas | int | `1` | |
| autoscaling.targetCPUUtilizationPercentage | int | `80` | |
| dind.image.pullPolicy | string | `"IfNotPresent"` | |
| dind.image.registry | string | `"docker.io"` | |
| dind.image.repository | string | `"library/docker"` | |
| dind.image.tag | string | `"28.0.0-dind"` | |
| extraEnvVars | list | `[]` | Additional environment variables to be set on runner container Example: extraEnvVars: - name: FOO value: "bar" |
| fullnameOverride | string | `""` | |
| image.pullPolicy | string | `"IfNotPresent"` | |
| image.registry | string | `"code.forgejo.org"` | |
| image.repository | string | `"forgejo/runner"` | |
| image.tag | string | `""` | |
| image.pullPolicy | string | `"IfNotPresent"` | pull policy |
| image.registry | string | `"code.forgejo.org"` | image registry |
| image.repository | string | `"forgejo/runner"` | image repository |
| image.tag | string | `""` | image tag - Overrides the image tag whose default is the chart appVersion. |
| imagePullSecrets | list | `[]` | |
| kubectl.image.pullPolicy | string | `"IfNotPresent"` | |
| kubectl.image.registry | string | `"docker.io"` | |
@ -137,7 +143,7 @@ helm uninstall forgejo-runner-release
| podLabels | object | `{}` | |
| podSecurityContext | object | `{}` | |
| replicaCount | int | `1` | |
| resources | object | `{}` | |
| resources | object | `{}` | We usually recommend not to specify default resources and to leave this as a conscious choice for the user. This also increases chances charts run on environments with little resources, such as Minikube. If you do want to specify resources, uncomment the following lines, adjust them as necessary, and remove the curly braces after 'resources:'. limits: cpu: 100m memory: 128Mi requests: cpu: 100m memory: 128Mi |
| runner.config.create | bool | `true` | |
| runner.config.existingSecret | string | `""` | use existingSecret instatt |
| runner.config.instance | string | `"https://codeberg.org"` | |

View file

@ -82,7 +82,11 @@ spec:
image: "{{ .Values.dind.image.registry }}/{{ .Values.dind.image.repository }}:{{ .Values.dind.image.tag }}"
imagePullPolicy: {{ .Values.dind.image.pullPolicy }}
resources:
{{- with .Values.dind.resources }}
{{- toYaml . | nindent 12 }}
{{- else }}
{{- toYaml .Values.resources | nindent 12 }}
{{- end }}
env:
- name: DOCKER_TLS_CERTDIR
value: /certs

View file

@ -5,10 +5,13 @@
replicaCount: 1
image:
# -- image registry
registry: code.forgejo.org
# -- image repository
repository: forgejo/runner
# -- pull policy
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
# -- image tag - Overrides the image tag whose default is the chart appVersion.
tag: ""
imagePullSecrets: []
@ -141,10 +144,31 @@ runner:
workdir_parent:
dind:
image:
# -- image registry
# @section -- Docker in Docker
registry: docker.io
# -- image repository
# @section -- Docker in Docker
repository: library/docker
# -- pull policy
# @section -- Docker in Docker
pullPolicy: IfNotPresent
# -- image tag
# @section -- Docker in Docker
tag: 28.0.0-dind
# -- We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi
# @section -- Docker in Docker
resources: {}
kubectl:
image:
registry: docker.io
@ -178,17 +202,17 @@ securityContext:
# runAsNonRoot: true
# runAsUser: 1000
# -- We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi
resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi
autoscaling:
enabled: false