mirror of
https://github.com/actions/actions-runner-controller.git
synced 2026-01-21 20:01:04 +08:00
rewriting the gha-runner-scale-set-chart
This commit is contained in:
20
charts/dev/templates/_helpers.tpl
Normal file
20
charts/dev/templates/_helpers.tpl
Normal file
@@ -0,0 +1,20 @@
|
||||
{{- define "autoscaling-runner-set.name" -}}
|
||||
{{- $name := .Values.runnerScaleSetName | default .Release.Name | replace "_" "-" | trimSuffix "-" }}
|
||||
{{- if or (empty $name) (gt (len $name) 45) }}
|
||||
{{ fail "Autoscaling runner set name must have up to 45 characters" }}
|
||||
{{- end }}
|
||||
{{- $name }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "autoscaling-runner-set.namespace" -}}
|
||||
{{- .Values.namespaceOverride | default .Release.Namespace -}}
|
||||
{{- end }}
|
||||
|
||||
|
||||
{{- define "githubsecret.name" -}}
|
||||
{{- if not (empty .Values.auth.secretName) }}
|
||||
{{- quote .Values.auth.secretName }}
|
||||
{{- else }}
|
||||
{{- include "autoscaling-runner-set.name" . }}-github-secret
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
Reference in New Issue
Block a user