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 }}