From dd0e6269733e555dc5aa80402148016b82eb00b3 Mon Sep 17 00:00:00 2001 From: Max Cai Date: Tue, 17 Dec 2024 11:48:12 -0500 Subject: [PATCH 1/2] feat: add fullname override option for gha-runner-scale-set --- charts/gha-runner-scale-set/templates/_helpers.tpl | 4 ++++ charts/gha-runner-scale-set/values.yaml | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/charts/gha-runner-scale-set/templates/_helpers.tpl b/charts/gha-runner-scale-set/templates/_helpers.tpl index bd71ed64c9..0aaa221b6f 100644 --- a/charts/gha-runner-scale-set/templates/_helpers.tpl +++ b/charts/gha-runner-scale-set/templates/_helpers.tpl @@ -20,9 +20,13 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this If release name contains chart name it will be used as a full name. */}} {{- define "gha-runner-scale-set.fullname" -}} +{{- if .Values.fullnameOverride -}} +{{- .Values.fullnameOverride -}} +{{- else -}} {{- $name := default (include "gha-base-name" .) }} {{- printf "%s-%s" (include "gha-runner-scale-set.scale-set-name" .) $name | trunc 63 | trimSuffix "-" }} {{- end }} +{{- end }} {{/* Create chart name and version as used by the chart label. diff --git a/charts/gha-runner-scale-set/values.yaml b/charts/gha-runner-scale-set/values.yaml index 6018b7d0e5..0cc026aa6e 100644 --- a/charts/gha-runner-scale-set/values.yaml +++ b/charts/gha-runner-scale-set/values.yaml @@ -48,6 +48,11 @@ githubConfigSecret: ## name of the runner scale set to create. Defaults to the helm release name # runnerScaleSetName: "" +## Override the fullname of the gha-runner-scale-set +## This is useful for deploying multiple runner scale sets in the same namespace +## with the same scale set name but different GitHub configuration URLs. +fullnameOverride: "" + ## 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: From e8fc1ed87859da73af233708875d64604e86444e Mon Sep 17 00:00:00 2001 From: Max Cai Date: Wed, 18 Dec 2024 20:54:40 -0500 Subject: [PATCH 2/2] make the gha-runner-scale-set.scale-set-name same as fullnameOverride --- charts/gha-runner-scale-set/templates/_helpers.tpl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/charts/gha-runner-scale-set/templates/_helpers.tpl b/charts/gha-runner-scale-set/templates/_helpers.tpl index 0aaa221b6f..d2b6f19b24 100644 --- a/charts/gha-runner-scale-set/templates/_helpers.tpl +++ b/charts/gha-runner-scale-set/templates/_helpers.tpl @@ -11,8 +11,12 @@ gha-rs {{- end }} {{- define "gha-runner-scale-set.scale-set-name" -}} +{{- if .Values.fullnameOverride -}} +{{- .Values.fullnameOverride -}} +{{- else -}} {{ .Values.runnerScaleSetName | default .Release.Name }} {{- end }} +{{- end }} {{/* Create a default fully qualified app name.