From 23f357db1048403322ad7f833cab7afdc5155af8 Mon Sep 17 00:00:00 2001 From: Jonathan Wiemers Date: Fri, 15 Jul 2022 02:57:30 +0200 Subject: [PATCH] Adds way to allow additional environment variables from secretKeyRef (#1565) * adds additionalFullEnv to allow additional secret refs * Update charts/actions-runner-controller/templates/deployment.yaml Co-authored-by: Yusuke Kuoka * adds examples into values.yaml * fix Co-authored-by: Yusuke Kuoka --- .../templates/deployment.yaml | 4 ++++ charts/actions-runner-controller/values.yaml | 11 +++++++++++ 2 files changed, 15 insertions(+) diff --git a/charts/actions-runner-controller/templates/deployment.yaml b/charts/actions-runner-controller/templates/deployment.yaml index 55a9f601..522d835b 100644 --- a/charts/actions-runner-controller/templates/deployment.yaml +++ b/charts/actions-runner-controller/templates/deployment.yaml @@ -118,10 +118,14 @@ spec: name: {{ include "actions-runner-controller.secretName" . }} optional: true {{- end }} + {{- if kindIs "slice" .Values.env }} + {{- toYaml .Values.env | nindent 8 }} + {{- else }} {{- range $key, $val := .Values.env }} - name: {{ $key }} value: {{ $val | quote }} {{- end }} + {{- end }} image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default (cat "v" .Chart.AppVersion | replace " " "") }}" name: manager imagePullPolicy: {{ .Values.image.pullPolicy }} diff --git a/charts/actions-runner-controller/values.yaml b/charts/actions-runner-controller/values.yaml index d3083d5f..0323f501 100644 --- a/charts/actions-runner-controller/values.yaml +++ b/charts/actions-runner-controller/values.yaml @@ -149,10 +149,21 @@ priorityClassName: "" env: {} + # specify additional environment variables for the controller pod. + # It's possible to specify either key vale pairs e.g.: # http_proxy: "proxy.com:8080" # https_proxy: "proxy.com:8080" # no_proxy: "" + # or a list of complete environment variable definitions e.g.: + # - name: GITHUB_APP_INSTALLATION_ID + # valueFrom: + # secretKeyRef: + # key: some_key_in_the_secret + # name: some-secret-name + # optional: true + + ## specify additional volumes to mount in the manager container, this can be used ## to specify additional storage of material or to inject files from ConfigMaps ## into the running container