fix(forgejo-runner): add global (and improve docs)

This commit is contained in:
WrenIX 2025-02-27 10:54:34 +01:00
parent 552bfaf6d8
commit 6445458cd1
Signed by: wrenix
GPG key ID: 7AFDB012974B1BB5
4 changed files with 33 additions and 20 deletions

View file

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

View file

@ -7,7 +7,7 @@ description: "Deploy runner for an forgejo instance (default codeberg.org)"
# forgejo-runner # forgejo-runner
![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) ![Version: 0.4.17](https://img.shields.io/badge/Version-0.4.17-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) Deploy runner for an forgejo instance (default codeberg.org)
@ -80,8 +80,8 @@ helm uninstall forgejo-runner-release
| Key | Type | Default | Description | | Key | Type | Default | Description |
|-----|------|---------|-------------| |-----|------|---------|-------------|
| dind.image.pullPolicy | string | `"IfNotPresent"` | pull policy | | dind.image.pullPolicy | string | `"IfNotPresent"` | This sets the pull policy for images. (could be overwritten by global.image.pullPolicy) |
| dind.image.registry | string | `"docker.io"` | image registry | | dind.image.registry | string | `"docker.io"` | image registry (could be overwritten by global.image.registry) |
| dind.image.repository | string | `"library/docker"` | image repository | | dind.image.repository | string | `"library/docker"` | image repository |
| dind.image.tag | string | `"28.0.0-dind"` | image tag | | 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 | | 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 |
@ -128,8 +128,10 @@ helm uninstall forgejo-runner-release
| autoscaling.targetCPUUtilizationPercentage | int | `80` | | | autoscaling.targetCPUUtilizationPercentage | int | `80` | |
| extraEnvVars | list | `[]` | Additional environment variables to be set on runner container Example: extraEnvVars: - name: FOO value: "bar" | | extraEnvVars | list | `[]` | Additional environment variables to be set on runner container Example: extraEnvVars: - name: FOO value: "bar" |
| fullnameOverride | string | `""` | | | fullnameOverride | string | `""` | |
| image.pullPolicy | string | `"IfNotPresent"` | pull policy | | global.image.pullPolicy | string | `nil` | if set it will overwrite all pullPolicy |
| image.registry | string | `"code.forgejo.org"` | image registry | | global.image.registry | string | `nil` | if set it will overwrite all registry entries |
| image.pullPolicy | string | `"IfNotPresent"` | This sets the pull policy for images. (could be overwritten by global.image.pullPolicy) |
| image.registry | string | `"code.forgejo.org"` | image registry (could be overwritten by global.image.registry) |
| image.repository | string | `"forgejo/runner"` | image repository | | image.repository | string | `"forgejo/runner"` | image repository |
| image.tag | string | `""` | image tag - Overrides the image tag whose default is the chart appVersion. | | image.tag | string | `""` | image tag - Overrides the image tag whose default is the chart appVersion. |
| imagePullSecrets | list | `[]` | | | imagePullSecrets | list | `[]` | |
@ -142,7 +144,7 @@ helm uninstall forgejo-runner-release
| podAnnotations | object | `{}` | | | podAnnotations | object | `{}` | |
| podLabels | object | `{}` | | | podLabels | object | `{}` | |
| podSecurityContext | object | `{}` | | | podSecurityContext | object | `{}` | |
| replicaCount | int | `1` | | | replicaCount | int | `1` | replicas |
| 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 | | 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.create | bool | `true` | |
| runner.config.existingSecret | string | `""` | use existingSecret instatt | | runner.config.existingSecret | string | `""` | use existingSecret instatt |

View file

@ -32,8 +32,10 @@ spec:
{{- toYaml .Values.podSecurityContext | nindent 8 }} {{- toYaml .Values.podSecurityContext | nindent 8 }}
initContainers: initContainers:
- name: make-config-writeable - name: make-config-writeable
image: "{{ .Values.image.registry }}/{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" {{- with .Values.image }}
imagePullPolicy: {{ .Values.image.pullPolicy }} image: "{{ coalesce $.Values.global.image.registry .registry }}/{{ .repository }}:{{ .tag | default $.Chart.AppVersion }}"
imagePullPolicy: {{ coalesce $.Values.global.image.pullPolicy .pullPolicy }}
{{- end }}
command: [ "/bin/cp", "/etc/runner/.runner", "/data/.runner" ] command: [ "/bin/cp", "/etc/runner/.runner", "/data/.runner" ]
resources: resources:
{{- toYaml .Values.resources | nindent 12 }} {{- toYaml .Values.resources | nindent 12 }}
@ -46,8 +48,10 @@ spec:
- name: runner - name: runner
securityContext: securityContext:
{{- toYaml .Values.securityContext | nindent 12 }} {{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.registry }}/{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" {{- with .Values.image }}
imagePullPolicy: {{ .Values.image.pullPolicy }} image: "{{ coalesce $.Values.global.image.registry .registry }}/{{ .repository }}:{{ .tag | default $.Chart.AppVersion }}"
imagePullPolicy: {{ coalesce $.Values.global.image.pullPolicy .pullPolicy }}
{{- end }}
command: command:
- "sh" - "sh"
- "-c" - "-c"
@ -79,8 +83,10 @@ spec:
- name: dind - name: dind
securityContext: securityContext:
{{- toYaml .Values.securityContext | nindent 12 }} {{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.dind.image.registry }}/{{ .Values.dind.image.repository }}:{{ .Values.dind.image.tag }}" {{- with .Values.dind.image }}
imagePullPolicy: {{ .Values.dind.image.pullPolicy }} image: "{{ coalesce $.Values.global.image.registry .registry }}/{{ .repository }}:{{ .tag }}"
imagePullPolicy: {{ coalesce $.Values.global.image.pullPolicy .pullPolicy }}
{{- end }}
resources: resources:
{{- with .Values.dind.resources }} {{- with .Values.dind.resources }}
{{- toYaml . | nindent 12 }} {{- toYaml . | nindent 12 }}

View file

@ -1,15 +1,20 @@
# Default values for forgejo-runner. global:
# This is a YAML-formatted file. image:
# Declare variables to be passed into your templates. # -- if set it will overwrite all registry entries
registry:
# -- if set it will overwrite all pullPolicy
pullPolicy:
# -- replicas
replicaCount: 1 replicaCount: 1
image: image:
# -- image registry # -- image registry (could be overwritten by global.image.registry)
registry: code.forgejo.org registry: code.forgejo.org
# -- image repository # -- image repository
repository: forgejo/runner repository: forgejo/runner
# -- pull policy # -- This sets the pull policy for images. (could be overwritten by global.image.pullPolicy)
pullPolicy: IfNotPresent pullPolicy: IfNotPresent
# -- image tag - Overrides the image tag whose default is the chart appVersion. # -- image tag - Overrides the image tag whose default is the chart appVersion.
tag: "" tag: ""
@ -144,13 +149,13 @@ runner:
workdir_parent: workdir_parent:
dind: dind:
image: image:
# -- image registry # -- image registry (could be overwritten by global.image.registry)
# @section -- Docker in Docker # @section -- Docker in Docker
registry: docker.io registry: docker.io
# -- image repository # -- image repository
# @section -- Docker in Docker # @section -- Docker in Docker
repository: library/docker repository: library/docker
# -- pull policy # -- This sets the pull policy for images. (could be overwritten by global.image.pullPolicy)
# @section -- Docker in Docker # @section -- Docker in Docker
pullPolicy: IfNotPresent pullPolicy: IfNotPresent
# -- image tag # -- image tag