Skip to content

Commit abc0b67

Browse files
nikola-jokicLink-
andauthored
Revert chart name and use helper constant to trim the name base (#2824)
Co-authored-by: Bassem Dghaidi <[email protected]>
1 parent 963ab2a commit abc0b67

File tree

5 files changed

+20
-8
lines changed

5 files changed

+20
-8
lines changed

charts/gha-runner-scale-set-controller/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
apiVersion: v2
2-
name: gha-rs-controller
2+
name: gha-runner-scale-set-controller
33
description: A Helm chart for install actions-runner-controller CRD
44

55
# A chart can be either an 'application' or a 'library' chart.

charts/gha-runner-scale-set-controller/templates/_helpers.tpl

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11
{{/*
22
Expand the name of the chart.
33
*/}}
4+
5+
6+
{{- define "gha-base-name" -}}
7+
gha-rs-controller
8+
{{- end }}
9+
410
{{- define "gha-runner-scale-set-controller.name" -}}
5-
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
11+
{{- default (include "gha-base-name" .) .Values.nameOverride | trunc 63 | trimSuffix "-" }}
612
{{- end }}
713

814
{{/*
@@ -14,7 +20,7 @@ If release name contains chart name it will be used as a full name.
1420
{{- if .Values.fullnameOverride }}
1521
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
1622
{{- else }}
17-
{{- $name := default .Chart.Name .Values.nameOverride }}
23+
{{- $name := default (include "gha-base-name" .) .Values.nameOverride }}
1824
{{- if contains $name .Release.Name }}
1925
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
2026
{{- else }}
@@ -27,7 +33,7 @@ If release name contains chart name it will be used as a full name.
2733
Create chart name and version as used by the chart label.
2834
*/}}
2935
{{- define "gha-runner-scale-set-controller.chart" -}}
30-
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
36+
{{- printf "%s-%s" (include "gha-base-name" .) .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
3137
{{- end }}
3238

3339
{{/*

charts/gha-runner-scale-set/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
apiVersion: v2
2-
name: gha-rs
2+
name: gha-runner-scale-set
33
description: A Helm chart for deploying an AutoScalingRunnerSet
44

55
# A chart can be either an 'application' or a 'library' chart.

charts/gha-runner-scale-set/templates/_helpers.tpl

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
{{/*
22
Expand the name of the chart.
33
*/}}
4+
5+
{{- define "gha-base-name" -}}
6+
gha-rs
7+
{{- end }}
8+
49
{{- define "gha-runner-scale-set.name" -}}
5-
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
10+
{{- default (include "gha-base-name" .) .Values.nameOverride | trunc 63 | trimSuffix "-" }}
611
{{- end }}
712

813
{{/*
@@ -11,15 +16,15 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this
1116
If release name contains chart name it will be used as a full name.
1217
*/}}
1318
{{- define "gha-runner-scale-set.fullname" -}}
14-
{{- $name := default .Chart.Name }}
19+
{{- $name := default (include "gha-base-name" .) }}
1520
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
1621
{{- end }}
1722

1823
{{/*
1924
Create chart name and version as used by the chart label.
2025
*/}}
2126
{{- define "gha-runner-scale-set.chart" -}}
22-
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
27+
{{- printf "%s-%s" (include "gha-base-name" .) .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
2328
{{- end }}
2429

2530
{{/*

docs/gha-runner-scale-set-controller/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ You can follow [this troubleshooting guide](https://docs.github.com/en/actions/h
5353
1. Add configurable log format to values.yaml and propagate it to listener [#2686](https://github.com/actions/actions-runner-controller/pull/2686)
5454
1. Extend manager roles to accept ephemeralrunnerset/finalizers [#2493](https://github.com/actions/actions-runner-controller/pull/2493)
5555
1. Trim repo/org/enterprise to 63 characters in label values [#2657](https://github.com/actions/actions-runner-controller/pull/2657)
56+
1. Revert back chart renaming [#2824](https://github.com/actions/actions-runner-controller/pull/2824)
5657
1. Discard logs on helm chart tests [#2607](https://github.com/actions/actions-runner-controller/pull/2607)
5758
1. Use build.Version to check if resource version is a mismatch [#2521](https://github.com/actions/actions-runner-controller/pull/2521)
5859
1. Reordering methods and constants so it is easier to look it up [#2501](https://github.com/actions/actions-runner-controller/pull/2501)

0 commit comments

Comments
 (0)