From 37a55a4e0fd2da739d069484dfdfcb95e151c8d4 Mon Sep 17 00:00:00 2001 From: Alexey Pavlunin Date: Fri, 27 Sep 2024 10:59:06 +0300 Subject: [PATCH] fix(forgejo-runner): fix secrets creation, adding envs from values --- forgejo-runner/templates/deployment.yaml | 6 ++++++ forgejo-runner/templates/jobs.yaml | 1 + forgejo-runner/templates/secrets.yaml | 1 + 3 files changed, 8 insertions(+) diff --git a/forgejo-runner/templates/deployment.yaml b/forgejo-runner/templates/deployment.yaml index 61166f4..9c074ac 100644 --- a/forgejo-runner/templates/deployment.yaml +++ b/forgejo-runner/templates/deployment.yaml @@ -66,6 +66,12 @@ spec: value: /certs/client - name: DOCKER_TLS_VERIFY value: "1" + {{- with .Values.runner.config.file.runner.envs }} + {{- range $key, $value := . }} + - name: {{ $key }} + value: {{ $value | quote }} + {{- end }} + {{- end }} volumeMounts: - name: runner-configfile mountPath: /etc/runner diff --git a/forgejo-runner/templates/jobs.yaml b/forgejo-runner/templates/jobs.yaml index 50ba4d0..5f66027 100644 --- a/forgejo-runner/templates/jobs.yaml +++ b/forgejo-runner/templates/jobs.yaml @@ -60,6 +60,7 @@ metadata: name: {{ $secretName }} annotations: helm.sh/resource-policy: keep + "helm.sh/hook": "pre-install,pre-upgrade" type: Opaque --- apiVersion: v1 diff --git a/forgejo-runner/templates/secrets.yaml b/forgejo-runner/templates/secrets.yaml index ce511ab..6d9b249 100644 --- a/forgejo-runner/templates/secrets.yaml +++ b/forgejo-runner/templates/secrets.yaml @@ -7,5 +7,6 @@ metadata: {{- include "forgejo-runner.labels" . | nindent 4 }} annotations: config-hash: {{ toYaml .Values.runner.config.file | sha256sum }} + "helm.sh/hook": "pre-install,pre-upgrade" data: config.yaml: {{ toYaml .Values.runner.config.file | b64enc }}