add deploymentName config parameter

This commit is contained in:
Timm Drevensek 2023-10-24 12:27:29 +02:00
parent b511953df7
commit 5e20f60cec
3 changed files with 10 additions and 3 deletions

View File

@ -14,6 +14,10 @@ gha-rs
{{ .Values.runnerScaleSetName | default .Release.Name }}
{{- end }}
{{- define "gha-runner-scale-set.deployment-name" -}}
{{ .Values.deploymentName | default (include "gha-runner-scale-set.scale-set-name" .) }}
{{- end }}
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).

View File

@ -1,13 +1,13 @@
apiVersion: actions.github.com/v1alpha1
kind: AutoscalingRunnerSet
metadata:
{{- if or (not (include "gha-runner-scale-set.scale-set-name" .)) (gt (len (include "gha-runner-scale-set.scale-set-name" .)) 45) }}
{{- if or (not (include "gha-runner-scale-set.deployment-name" .)) (gt (len (include "gha-runner-scale-set.deployment-name" .)) 45) }}
{{ fail "Name must have up to 45 characters" }}
{{- end }}
{{- if gt (len .Release.Namespace) 63 }}
{{ fail "Namespace must have up to 63 characters" }}
{{- end }}
name: {{ include "gha-runner-scale-set.scale-set-name" . }}
name: {{ include "gha-runner-scale-set.deployment-name" . }}
namespace: {{ .Release.Namespace }}
labels:
app.kubernetes.io/component: "autoscaling-runner-set"
@ -33,7 +33,7 @@ spec:
{{- with .Values.runnerGroup }}
runnerGroup: {{ . }}
{{- end }}
{{- with .Values.runnerScaleSetName }}
{{- with (include "gha-runner-scale-set.scale-set-name" .) }}
runnerScaleSetName: {{ . }}
{{- end }}

View File

@ -47,6 +47,9 @@ githubConfigSecret:
## name of the runner scale set to create. Defaults to the helm release name
# runnerScaleSetName: ""
## name of the runner scale set deployment in kubernetes to create. Defaults to the runnerScaleSetName
# deploymentName: ""
## A self-signed CA certificate for communication with the GitHub server can be
## provided using a config map key selector. If `runnerMountPath` is set, for
## each runner pod ARC will: