From 5b899f578b9765971840a259ec3347ac31c03cf8 Mon Sep 17 00:00:00 2001 From: Felipe Galindo Sanchez Date: Sun, 6 Mar 2022 17:07:24 -0800 Subject: [PATCH] fix(chart): allow to use basic auth when authSecret.create is false (#1149) * fix(chart): allow to use basic auth when authSecret.create is false When secret is created outside of the ARC chart using authSecret.create=false and basicAuth, the controller fails as we're not including the basic password as environment variable as the password value won't be inside the helm values. This PR includes both environment variables for consistent regardless if those are set or not similar as the rest of the other auth options (e.g app_id, private key, etc) * chart: Add back the conditional block for .Values.authSecret.github_basicauth_username Co-authored-by: Yusuke Kuoka --- charts/actions-runner-controller/templates/deployment.yaml | 5 ++--- .../templates/githubwebhook.deployment.yaml | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/charts/actions-runner-controller/templates/deployment.yaml b/charts/actions-runner-controller/templates/deployment.yaml index d2f602ca..b6501885 100644 --- a/charts/actions-runner-controller/templates/deployment.yaml +++ b/charts/actions-runner-controller/templates/deployment.yaml @@ -105,17 +105,16 @@ spec: key: github_app_private_key name: {{ include "actions-runner-controller.secretName" . }} optional: true - {{- if .Values.authSecret.github_basicauth_username }} + {{- if .Values.authSecret.github_basicauth_username }} - name: GITHUB_BASICAUTH_USERNAME value: {{ .Values.authSecret.github_basicauth_username }} {{- end }} - {{- if .Values.authSecret.github_basicauth_password }} - name: GITHUB_BASICAUTH_PASSWORD valueFrom: secretKeyRef: key: github_basicauth_password name: {{ include "actions-runner-controller.secretName" . }} - {{- end }} + optional: true {{- end }} {{- range $key, $val := .Values.env }} - name: {{ $key }} diff --git a/charts/actions-runner-controller/templates/githubwebhook.deployment.yaml b/charts/actions-runner-controller/templates/githubwebhook.deployment.yaml index 6dbb428c..fd05a181 100644 --- a/charts/actions-runner-controller/templates/githubwebhook.deployment.yaml +++ b/charts/actions-runner-controller/templates/githubwebhook.deployment.yaml @@ -95,17 +95,16 @@ spec: key: github_app_private_key name: {{ include "actions-runner-controller.githubWebhookServerSecretName" . }} optional: true - {{- if .Values.authSecret.github_basicauth_username }} + {{- if .Values.authSecret.github_basicauth_username }} - name: GITHUB_BASICAUTH_USERNAME value: {{ .Values.authSecret.github_basicauth_username }} {{- end }} - {{- if .Values.authSecret.github_basicauth_password }} - name: GITHUB_BASICAUTH_PASSWORD valueFrom: secretKeyRef: key: github_basicauth_password name: {{ include "actions-runner-controller.secretName" . }} - {{- end }} + optional: true {{- end }} {{- range $key, $val := .Values.githubWebhookServer.env }} - name: {{ $key }}