Allow provide pre-defined kubernetes secret when helm-install AutoScalingRunnerSet (#2234)

This commit is contained in:
Tingluo Huang
2023-01-31 17:04:03 -05:00
committed by GitHub
parent a5cef7e47b
commit fbad56197f
4 changed files with 96 additions and 0 deletions

View File

@@ -51,7 +51,15 @@ app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}
{{- define "auto-scaling-runner-set.githubsecret" -}}
{{- if kindIs "string" .Values.githubConfigSecret }}
{{- if not (empty .Values.githubConfigSecret) }}
{{- .Values.githubConfigSecret }}
{{- else}}
{{- fail "Values.githubConfigSecret is required for setting auth with GitHub server." }}
{{- end }}
{{- else }}
{{- include "auto-scaling-runner-set.fullname" . }}-github-secret
{{- end }}
{{- end }}
{{- define "auto-scaling-runner-set.noPermissionServiceAccountName" -}}

View File

@@ -1,3 +1,4 @@
{{- if not (kindIs "string" .Values.githubConfigSecret) }}
apiVersion: v1
kind: Secret
metadata:
@@ -35,3 +36,4 @@ data:
{{- if and $hasAppId (or (not $hasInstallationId) (not $hasPrivateKey)) }}
{{- fail "A valid .Values.githubConfigSecret is required for setting auth with GitHub server, provide .Values.githubConfigSecret.github_app_installation_id and .Values.githubConfigSecret.github_app_private_key." }}
{{- end }}
{{- end}}