From bcfd5388bb4cef01394e3c61864ffcd9cd491788 Mon Sep 17 00:00:00 2001 From: Andrey Kitsul Date: Wed, 26 Feb 2025 17:25:03 +0700 Subject: [PATCH] feat(forgejo-runner): Added a separate setting for tune dind resources --- forgejo-runner/Chart.yaml | 2 +- forgejo-runner/templates/deployment.yaml | 4 +++ forgejo-runner/values.yaml | 46 ++++++++++++++++++------ 3 files changed, 40 insertions(+), 12 deletions(-) diff --git a/forgejo-runner/Chart.yaml b/forgejo-runner/Chart.yaml index 9108eed..98804c8 100644 --- a/forgejo-runner/Chart.yaml +++ b/forgejo-runner/Chart.yaml @@ -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: diff --git a/forgejo-runner/templates/deployment.yaml b/forgejo-runner/templates/deployment.yaml index f7a6a60..ae9b659 100644 --- a/forgejo-runner/templates/deployment.yaml +++ b/forgejo-runner/templates/deployment.yaml @@ -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 diff --git a/forgejo-runner/values.yaml b/forgejo-runner/values.yaml index 32416a9..ef4a8ba 100644 --- a/forgejo-runner/values.yaml +++ b/forgejo-runner/values.yaml @@ -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