Skip to content

Add multi-label support to scalesets#4408

Open
nikola-jokic wants to merge 4 commits intomasterfrom
nikola-jokic/scaleset-labels
Open

Add multi-label support to scalesets#4408
nikola-jokic wants to merge 4 commits intomasterfrom
nikola-jokic/scaleset-labels

Conversation

@nikola-jokic
Copy link
Collaborator

No description provided.

@nikola-jokic nikola-jokic added the gha-runner-scale-set Related to the gha-runner-scale-set mode label Mar 16, 2026
@github-actions
Copy link
Contributor

Hello! Thank you for your contribution.

Please review our contribution guidelines to understand the project's testing and code conventions.

@nikola-jokic nikola-jokic marked this pull request as ready for review March 16, 2026 23:18
Copilot AI review requested due to automatic review settings March 16, 2026 23:18
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds support for configuring multiple runner scale set labels via the AutoscalingRunnerSet spec and Helm chart values, and passes those labels through when creating the GitHub Runner Scale Set.

Changes:

  • Extend the AutoscalingRunnerSet API/CRDs with runnerScaleSetLabels: []string.
  • Update the controller to include user-provided labels when creating a Runner Scale Set (with de-duplication).
  • Add Helm values/templates + chart tests and introduce E2E scripts to validate custom label behavior (stable + experimental charts).

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
test/actions.github.com/custom-label-setup.test.sh New E2E script to install a scale set with a custom label and verify it on the CR.
test/actions.github.com/custom-label-setup-v2.test.sh Same E2E coverage for the experimental controller/chart.
controllers/actions.github.com/autoscalingrunnerset_controller.go Build Labels payload from spec.runnerScaleSetLabels when creating scale sets.
config/crd/bases/actions.github.com_autoscalingrunnersets.yaml Add CRD schema for runnerScaleSetLabels.
charts/gha-runner-scale-set/values.yaml Add scaleSetLabels values entry.
charts/gha-runner-scale-set/templates/autoscalingrunnerset.yaml Render spec.runnerScaleSetLabels from Helm values.
charts/gha-runner-scale-set/tests/template_test.go Add a Go-based Helm render test for labels rendering.
charts/gha-runner-scale-set-experimental/values.yaml Add scaleset.labels values entry + docs.
charts/gha-runner-scale-set-experimental/templates/autoscalingrunnserset.yaml Render spec.runnerScaleSetLabels from experimental Helm values.
charts/gha-runner-scale-set-experimental/tests/autoscaling_runner_set_scale_set_labels_test.yaml Add helm-unittest coverage for experimental label rendering.
charts/*/crds/actions.github.com_autoscalingrunnersets.yaml Update packaged CRDs to include runnerScaleSetLabels.
apis/actions.github.com/v1alpha1/* Add API field + deepcopy support for RunnerScaleSetLabels.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment on lines +439 to +447
if _, exists := unique[label]; exists {
logger.Info("Duplicate label found. Skipping adding duplicate label to runner scale set", "label", label)
continue
}
labels = append(labels, scaleset.Label{
Name: label,
Type: "System",
})
unique[label] = true
Comment on lines +427 to +432
labels := []scaleset.Label{
{
Name: autoscalingRunnerSet.Spec.RunnerScaleSetName,
Type: "System",
},
}

function install_arc() {
echo "Creating namespace ${ARC_NAMESPACE}"
kubectl create namespace "${SCALE_SET_NAMESPACE}"
--version="${VERSION}" \
--debug

if ! NAME="${SCALE_SET_NAME}" NAMESPACE="${ARC_NAMESPACE}" wait_for_scale_set; then

function install_arc() {
echo "Creating namespace ${ARC_NAMESPACE}"
kubectl create namespace "${SCALE_SET_NAMESPACE}"
"${ROOT_DIR}/charts/gha-runner-scale-set-experimental" \
--version="${VERSION}"

if ! NAME="${SCALE_SET_NAME}" NAMESPACE="${ARC_NAMESPACE}" wait_for_scale_set; then
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gha-runner-scale-set Related to the gha-runner-scale-set mode

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants