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

View file

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

View file

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