Skip to content

feat(arc): let the ARC role manage an install that uses its own names - #9

Merged
Mearman merged 4 commits into
mainfrom
feat/arc-configurable-names
Sep 25, 2026
Merged

Mearman merged 4 commits into
mainfrom
feat/arc-configurable-names

Conversation

@Mearman

@Mearman Mearman commented Sep 25, 2026

Copy link
Copy Markdown
Member

The ARC role could only manage an install it had created itself: the controller was always release arc in actions-runner-controller, each scale set <org>-runners<suffix> in arc-runners-<org><suffix>, the App Secret <org>-github-app, and every release got a scaleSetLabels entry. Pointed at a cluster whose ARC install uses its own names, it would install a second controller and scale set next to the existing ones. This makes each of those names configurable so the role can upgrade an existing install in place.

New settings:

  • github_runner_arc_controller_release_name and github_runner_arc_controller_namespace (defaults arc and actions-runner-controller). The controller install, its anti-affinity selector, the stale-listener lookup, the heartbeat's RBAC and the platform's namespace list all use them. scripts/heartbeat.sh reads the controller namespace from HEARTBEAT_CONTROLLER_NAMESPACE; the role only passes it when it isn't the default, so the heartbeat Deployment is untouched for existing configurations. A non-default namespace needs a heartbeat image built from this change.
  • Per profile, namespace and release_name override the suffix-derived names; per org, app_secret_name overrides <org>-github-app. The autoscaler's RBAC and environment, and the Secret checks, follow them through the expanded profile.
  • Per profile, scale_set_labels sets the whole scaleSetLabels list in place of runs_on_label. An empty list sets none, for installs whose jobs target the release name.
  • github_runner_arc_manage_image_pull_secret (follows github_runner_arc_manage_secrets) lets the role use a pull Secret something else creates and keeps current, by name, without a registry credential. With github_runner_arc_manage_secrets false the role also stops resolving the installation ID, which only ever went into the App Secret.
  • A profile's max_runners now sets maxRunners through the overlay, so it applies with a values file too and takes precedence over sizing. Before, it was only read by the role's default values template, and sizing overrode it.

Validation also rejects two of an org's profiles sharing a release name (it's the scale set's name on GitHub) and invalid controller names. The role now has a meta/argument_specs.yml covering all its variables; org and profile entries are left to the filter's own checks. The role README has a section on managing an existing install.

Every default reproduces the previous names, so a fleet that sets none of these sees no change. I checked that by running a fleet's arc.yml --check --diff with helm-diff on the host, once against the released 1.0.2 collection and once against this branch built on 1.0.2: both report the controller release, both scale-set releases, the heartbeat and autoscaler Deployments and every Secret and RBAC object as ok, and the only difference in the task list is the new validation item and the argument spec check. After rebasing onto 1.0.3 the result is the same once the platform images are held at 1.0.2.

For the other direction I mapped an existing install with its own controller and scale-set names, an out-of-band App Secret and pull Secret, no scaleSetLabels and an externally computed runner ceiling onto these settings, ran the role's validation and rendered its controller and scale-set values locally (no cluster involved). The release names, namespaces, Secret names, --set values and merged Helm values came out identical to what that install currently deploys.

yamllint, ansible-lint (production profile), the playbook syntax checks, the unit tests (new ones cover the name overrides, label lists and max_runners precedence and validation) and the collection build all pass locally.

github_runner_arc_controller_release_name and
github_runner_arc_controller_namespace default to arc and
actions-runner-controller, as before.
The controller install, its anti-affinity selector, the stale-listener
lookup, the heartbeat's RBAC and the namespaces the platform ensures all
use them, so the role can manage a controller that an existing install
created under other names instead of adding a second one.

The heartbeat script reads the controller's namespace from
HEARTBEAT_CONTROLLER_NAMESPACE.
The role passes it only when it differs from the script's default, so
an unchanged configuration leaves the heartbeat Deployment as it is.
github_runner_arc_manage_image_pull_secret separates the pull Secret from
the App and heartbeat Secrets that github_runner_arc_manage_secrets
covers, and follows it unless set, so existing configurations behave as
before.
When false, the role writes no pull Secret in any namespace, needs no
registry credential, skips the image pull check, and checks before
changing anything that the Secret named by
github_runner_arc_image_pull_secret_name exists.
This suits a pull Secret that something else mints and keeps current,
such as one made from a GitHub App installation token.

With github_runner_arc_manage_secrets false the role no longer resolves
an installation ID either, since it only goes into the App Secret the
role does not write, so an org needs no private_key in that case.
…abels

A profile's namespace and release_name replace the names derived from
its suffix, an org's app_secret_name replaces <org>-github-app, and a
profile's scale_set_labels sets the whole scaleSetLabels list in place
of runs_on_label, with an empty list setting none so that jobs target
the release name.
Left unset, every name and label is derived exactly as before.
Validation still requires valid Kubernetes names, and now also rejects
two of an org's profiles sharing a release name, since that is the
scale set's name on GitHub.

A profile's own max_runners now sets maxRunners through the role's
overlay, so it applies with a values file too and takes precedence over
sizing.
The expanded profile carries the resulting value, which is sizing's
ceiling on an ordinary profile without max_runners, as before.
meta/argument_specs.yml lists every variable the role reads, with its
type and purpose, so ansible-doc can show them and a wrongly typed value
fails when the role starts.
Org and profile entries are described but not restricted key by key,
because the arc_profiles filter already checks their structure.
@Mearman
Mearman marked this pull request as ready for review September 25, 2026 22:59
@Mearman
Mearman merged commit e565cdb into main Sep 25, 2026
14 checks passed
@Mearman
Mearman deleted the feat/arc-configurable-names branch September 25, 2026 23:00
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 1.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
🔒 Security Review ⚠️ Failed 2026-09-25T23:01:46.475365Z be8d9a8 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant