Prepare 0.14.0 release (#4413)
Some checks failed
Validate Helm Chart / Lint Chart (push) Has been cancelled
(gha) Validate Helm Charts / Lint Chart (push) Has been cancelled
(gha) Validate Helm Charts / Test Chart (push) Has been cancelled

This commit is contained in:
Nikola Jokic
2026-03-19 18:53:37 +01:00
committed by GitHub
parent 19f22b85e7
commit 8b7f232dc4
17 changed files with 271 additions and 71 deletions

View File

@@ -15,13 +15,13 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.13.1
version: 0.14.0
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "0.13.1"
appVersion: "0.14.0"
home: https://github.com/actions/actions-runner-controller

View File

@@ -0,0 +1,52 @@
package tests
import (
"os"
"path/filepath"
"strings"
"testing"
"github.com/gruntwork-io/terratest/modules/helm"
"github.com/gruntwork-io/terratest/modules/k8s"
"github.com/gruntwork-io/terratest/modules/logger"
"github.com/gruntwork-io/terratest/modules/random"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"gopkg.in/yaml.v2"
appsv1 "k8s.io/api/apps/v1"
)
type Chart struct {
Version string `yaml:"version"`
AppVersion string `yaml:"appVersion"`
}
func TestTemplate_RenderedDeployment_UsesChartMetadataLabels(t *testing.T) {
t.Parallel()
helmChartPath, err := filepath.Abs("../../gha-runner-scale-set-controller-experimental")
require.NoError(t, err)
chartContent, err := os.ReadFile(filepath.Join(helmChartPath, "Chart.yaml"))
require.NoError(t, err)
chart := new(Chart)
err = yaml.Unmarshal(chartContent, chart)
require.NoError(t, err)
releaseName := "test-arc"
namespaceName := "test-" + strings.ToLower(random.UniqueId())
options := &helm.Options{
Logger: logger.Discard,
KubectlOptions: k8s.NewKubectlOptions("", "", namespaceName),
}
output := helm.RenderTemplate(t, options, helmChartPath, releaseName, []string{"templates/deployment.yaml"})
var deployment appsv1.Deployment
helm.UnmarshalK8SYaml(t, output, &deployment)
assert.Equal(t, "gha-rs-controller-"+chart.Version, deployment.Labels["helm.sh/chart"])
assert.Equal(t, chart.AppVersion, deployment.Labels["app.kubernetes.io/version"])
}

View File

@@ -15,13 +15,13 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.13.1
version: 0.14.0
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "0.13.1"
appVersion: "0.14.0"
home: https://github.com/actions/actions-runner-controller

View File

@@ -15,13 +15,13 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: "0.13.1"
version: "0.14.0"
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "0.13.1"
appVersion: "0.14.0"
home: https://github.com/actions/actions-runner-controller

View File

@@ -12,12 +12,7 @@ tests:
release:
name: "test-name"
namespace: "test-namespace"
chart:
appVersion: "0.13.1"
asserts:
- equal:
path: metadata.labels["helm.sh/chart"]
value: "gha-rs-0.13.1"
- equal:
path: metadata.labels["app.kubernetes.io/name"]
value: "test-name"
@@ -33,9 +28,9 @@ tests:
- equal:
path: metadata.labels["app.kubernetes.io/part-of"]
value: "gha-rs"
- equal:
- notEqual:
path: metadata.labels["app.kubernetes.io/version"]
value: "0.13.1"
value: ""
- equal:
path: metadata.labels["actions.github.com/scale-set-name"]
value: "test-name"
@@ -66,9 +61,6 @@ tests:
- equal:
path: metadata.labels["environment"]
value: "production"
- equal:
path: metadata.labels["helm.sh/chart"]
value: "gha-rs-0.13.1"
- equal:
path: metadata.labels["app.kubernetes.io/name"]
value: "test-name"
@@ -84,9 +76,9 @@ tests:
- equal:
path: metadata.labels["app.kubernetes.io/part-of"]
value: "gha-rs"
- equal:
- notEqual:
path: metadata.labels["app.kubernetes.io/version"]
value: "0.13.1"
value: ""
- equal:
path: metadata.labels["actions.github.com/scale-set-name"]
value: "test-name"
@@ -117,9 +109,6 @@ tests:
- equal:
path: metadata.labels["owner"]
value: "devops"
- equal:
path: metadata.labels["helm.sh/chart"]
value: "gha-rs-0.13.1"
- equal:
path: metadata.labels["app.kubernetes.io/name"]
value: "test-name"
@@ -135,9 +124,9 @@ tests:
- equal:
path: metadata.labels["app.kubernetes.io/part-of"]
value: "gha-rs"
- equal:
- notEqual:
path: metadata.labels["app.kubernetes.io/version"]
value: "0.13.1"
value: ""
- equal:
path: metadata.labels["actions.github.com/scale-set-name"]
value: "test-name"
@@ -176,9 +165,6 @@ tests:
- equal:
path: metadata.labels["environment"]
value: "staging"
- equal:
path: metadata.labels["helm.sh/chart"]
value: "gha-rs-0.13.1"
- equal:
path: metadata.labels["app.kubernetes.io/name"]
value: "test-name"
@@ -194,9 +180,9 @@ tests:
- equal:
path: metadata.labels["app.kubernetes.io/part-of"]
value: "gha-rs"
- equal:
- notEqual:
path: metadata.labels["app.kubernetes.io/version"]
value: "0.13.1"
value: ""
- equal:
path: metadata.labels["actions.github.com/scale-set-name"]
value: "test-name"

View File

@@ -26,8 +26,6 @@ tests:
release:
name: "test-name"
namespace: "test-namespace"
chart:
appVersion: "0.13.1"
asserts:
- equal:
path: spec.template.metadata.labels["purpose"]
@@ -35,12 +33,12 @@ tests:
- equal:
path: spec.template.metadata.labels["team"]
value: "platform"
- equal:
path: spec.template.metadata.labels["helm.sh/chart"]
value: "gha-rs-0.13.1"
- equal:
path: spec.template.metadata.labels["app.kubernetes.io/name"]
value: "test-name"
- notEqual:
path: spec.template.metadata.labels["app.kubernetes.io/version"]
value: ""
- equal:
path: spec.template.metadata.labels["app.kubernetes.io/managed-by"]
value: "Helm"

View File

@@ -10,12 +10,7 @@ tests:
release:
name: "test-name"
namespace: "test-namespace"
chart:
appVersion: "0.13.1"
asserts:
- equal:
path: metadata.labels["helm.sh/chart"]
value: "gha-rs-0.13.1"
- equal:
path: metadata.labels["app.kubernetes.io/name"]
value: "test-name"
@@ -31,9 +26,9 @@ tests:
- equal:
path: metadata.labels["app.kubernetes.io/part-of"]
value: "gha-rs"
- equal:
- notEqual:
path: metadata.labels["app.kubernetes.io/version"]
value: "0.13.1"
value: ""
- equal:
path: metadata.labels["actions.github.com/scale-set-name"]
value: "test-name"
@@ -109,9 +104,9 @@ tests:
name: "test-name"
namespace: "test-namespace"
asserts:
- equal:
- notEqual:
path: metadata.labels["helm.sh/chart"]
value: "gha-rs-0.13.1"
value: "bad"
- equal:
path: metadata.labels["app.kubernetes.io/name"]
value: "test-name"

View File

@@ -12,8 +12,6 @@ tests:
release:
name: "test-name"
namespace: "test-namespace"
chart:
appVersion: "0.13.1"
asserts:
- equal:
path: apiVersion
@@ -159,12 +157,10 @@ tests:
release:
name: "test-name"
namespace: "test-namespace"
chart:
appVersion: "0.13.1"
asserts:
- equal:
- notEqual:
path: metadata.labels["helm.sh/chart"]
value: "gha-rs-0.13.1"
value: "bad"
- equal:
path: metadata.labels["app.kubernetes.io/name"]
value: "test-name"

View File

@@ -12,8 +12,6 @@ tests:
release:
name: "test-name"
namespace: "test-namespace"
chart:
appVersion: "0.13.1"
asserts:
- equal:
path: apiVersion

View File

@@ -12,8 +12,6 @@ tests:
release:
name: "test-name"
namespace: "test-namespace"
chart:
appVersion: "0.13.1"
asserts:
- equal:
path: apiVersion
@@ -144,12 +142,10 @@ tests:
release:
name: "test-name"
namespace: "test-namespace"
chart:
appVersion: "0.13.1"
asserts:
- equal:
- notEqual:
path: metadata.labels["helm.sh/chart"]
value: "gha-rs-0.13.1"
value: "bad"
- equal:
path: metadata.labels["app.kubernetes.io/name"]
value: "test-name"

View File

@@ -9,12 +9,7 @@ tests:
release:
name: "test-name"
namespace: "test-namespace"
chart:
appVersion: "0.13.1"
asserts:
- equal:
path: metadata.labels["helm.sh/chart"]
value: "gha-rs-0.13.1"
- equal:
path: metadata.labels["app.kubernetes.io/name"]
value: "test-name"
@@ -30,9 +25,9 @@ tests:
- equal:
path: metadata.labels["app.kubernetes.io/part-of"]
value: "gha-rs"
- equal:
- notEqual:
path: metadata.labels["app.kubernetes.io/version"]
value: "0.13.1"
value: ""
- equal:
path: metadata.labels["actions.github.com/scale-set-name"]
value: "test-name"
@@ -58,8 +53,6 @@ tests:
release:
name: "test-name"
namespace: "test-namespace"
chart:
appVersion: "0.13.1"
asserts:
- equal:
path: metadata.labels["owner"]
@@ -83,8 +76,6 @@ tests:
release:
name: "test-name"
namespace: "test-namespace"
chart:
appVersion: "0.13.1"
asserts:
- equal:
path: metadata.labels["actions.github.com/scale-set-name"]

View File

@@ -6,8 +6,6 @@ tests:
release:
name: "test-name"
namespace: "test-namespace"
chart:
appVersion: "0.13.1"
asserts:
- equal:
path: apiVersion

View File

@@ -0,0 +1,61 @@
package tests
import (
"os"
"path/filepath"
"strings"
"testing"
v1alpha1 "github.com/actions/actions-runner-controller/apis/actions.github.com/v1alpha1"
"github.com/gruntwork-io/terratest/modules/helm"
"github.com/gruntwork-io/terratest/modules/k8s"
"github.com/gruntwork-io/terratest/modules/logger"
"github.com/gruntwork-io/terratest/modules/random"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"gopkg.in/yaml.v2"
)
type Chart struct {
Version string `yaml:"version"`
AppVersion string `yaml:"appVersion"`
}
func TestTemplate_RenderedAutoscalingRunnerSet_UsesChartMetadataLabels(t *testing.T) {
t.Parallel()
helmChartPath, err := filepath.Abs("../../gha-runner-scale-set-experimental")
require.NoError(t, err)
chartContent, err := os.ReadFile(filepath.Join(helmChartPath, "Chart.yaml"))
require.NoError(t, err)
chart := new(Chart)
err = yaml.Unmarshal(chartContent, chart)
require.NoError(t, err)
releaseName := "test-runners"
namespaceName := "test-" + strings.ToLower(random.UniqueId())
options := &helm.Options{
Logger: logger.Discard,
SetValues: map[string]string{
"scaleset.name": "test",
"auth.url": "https://github.com/actions",
"auth.githubToken": "gh_token12345",
"controllerServiceAccount.name": "arc",
"controllerServiceAccount.namespace": "arc-system",
},
KubectlOptions: k8s.NewKubectlOptions("", "", namespaceName),
}
output := helm.RenderTemplate(t, options, helmChartPath, releaseName, []string{"templates/autoscalingrunnserset.yaml"})
var autoscalingRunnerSet v1alpha1.AutoscalingRunnerSet
helm.UnmarshalK8SYaml(t, output, &autoscalingRunnerSet)
assert.Equal(t, "gha-rs-"+chart.Version, autoscalingRunnerSet.Labels["helm.sh/chart"])
assert.Equal(t, chart.AppVersion, autoscalingRunnerSet.Labels["app.kubernetes.io/version"])
assert.Equal(t, "gha-rs-"+chart.Version, autoscalingRunnerSet.Spec.Template.Labels["helm.sh/chart"])
assert.Equal(t, chart.AppVersion, autoscalingRunnerSet.Spec.Template.Labels["app.kubernetes.io/version"])
}

View File

@@ -15,13 +15,13 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.13.1
version: 0.14.0
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "0.13.1"
appVersion: "0.14.0"
home: https://github.com/actions/actions-runner-controller