Skip to content

ci: Change to use github runner set for ci runners - #659

Merged
XinyueZhang369 merged 4 commits into
mainfrom
xz/move-github-arc
Mar 6, 2026
Merged

XinyueZhang369 merged 4 commits into
mainfrom
xz/move-github-arc

Conversation

@XinyueZhang369

@XinyueZhang369 XinyueZhang369 commented Mar 6, 2026 •

Copy link
Copy Markdown
Collaborator

Description

Problem

The GitHub Actions self-hosted runners are using the legacy summerwind/actions-runner-controller CRD-based configuration (RunnerDeployment). This needs to be migrated to the newer actions.github.com/v1alpha1 ARC (Actions Runner Controller) runner scale set approach, which uses Helm-based gha-runner-scale-set charts for better scalability and official GitHub support.

Solution

Migrate to the official ARC runner scale set model by:

  1. Adding Helm values files for each runner configuration (CPU, 1/2/4-GPU H100, 4-GPU general)
  2. Updating the nightly-benchmark.yml workflow to use the new runs-on labels that match the runnerScaleSetName (e.g., 4-gpu-h100 instead of ["k8s-runner-gpu", "4-gpu-h100"])
  3. Adding a comprehensive deployment guide (README.md) covering GitHub App setup, secret creation, controller installation, and runner scale set installation

Changes

  • .github/workflows/nightly-benchmark.yml: Updated runs-on labels for benchmark jobs from array-style labels (["k8s-runner-gpu", "4-gpu-h100"]) to scalar runner scale set
    names (4-gpu-h100)
  • scripts/k8s-runner-resources/README.md: Added full ARC deployment guide with step-by-step instructions for GitHub App creation, secret setup, controller and runner scale
    set installation, upgrading, and uninstalling
  • scripts/k8s-runner-resources/arc-secret-template.yaml: Added Kubernetes Secret template for GitHub App credentials
  • scripts/k8s-runner-resources/runner-values-cpu.yaml: Helm values for CPU-only runners (8 CPU, 16Gi memory, min 4 / max 8 runners)
  • scripts/k8s-runner-resources/runner-values-1-gpu-h100.yaml: Helm values for 1x H100 GPU runners (max 6 runners)
  • scripts/k8s-runner-resources/runner-values-2-gpu-h100.yaml: Helm values for 2x H100 GPU runners (max 6 runners)
  • scripts/k8s-runner-resources/runner-values-4-gpu-h100.yaml: Helm values for 4x H100 GPU runners (min 4 / max 8 runners)
  • scripts/k8s-runner-resources/runner-values-4-gpu-general.yaml: Helm values for 4x GPU runners on H100 or A10 nodes (min 10 / max 20 runners)

Test Plan

  • Verify runner scale sets are deployed and listener pods are running via kubectl get pods -n actions-runner-system
  • Validate that runner pods are created on-demand and cleaned up after job completion
Checklist
  • cargo +nightly fmt passes
  • cargo clippy --all-targets --all-features -- -D warnings passes
  • (Optional) Documentation updated

Summary by CodeRabbit

  • Documentation

    • Added a comprehensive guide for deploying and managing CI/CD runners on Kubernetes with setup, configuration, and verification steps.
  • Chores

    • Added multiple runner configuration presets for CPU and various GPU profiles.
    • Added a template for creating the runner secret.
    • Removed legacy runner deployments, autoscalers, and associated RBAC resources.
  • Workflow

    • Nightly benchmark workflow now targets a specific GPU runner label.

@github-actions github-actions Bot added documentation Improvements or additions to documentation ci CI/CD configuration changes labels Mar 6, 2026
@coderabbitai

coderabbitai Bot commented Mar 6, 2026 •

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

Replaces multi-target runner selection in CI workflow with a single 4-gpu-h100 runner; adds ARC v2 Helm values and templates for CPU and multiple GPU runner scale sets and an ARC secret template and README; removes legacy ARC RunnerDeployment, autoscaler, and RBAC manifests.

Changes

Cohort / File(s) Summary
CI Workflow
.github/workflows/nightly-benchmark.yml
Changed runs-on from an array ["k8s-runner-gpu", "4-gpu-h100"] to the single label 4-gpu-h100 for benchmark jobs.
ARC docs
scripts/k8s-runner-resources/README.md
Added an end-to-end ARC deployment guide (prereqs, GitHub App, secret creation, Helm install, runner values, verification, upgrade/uninstall).
ARC secret template
scripts/k8s-runner-resources/arc-secret-template.yaml
Added Kubernetes Secret manifest template for GitHub App credentials (app id, installation id, private key).
New Helm values (runners)
scripts/k8s-runner-resources/runner-values-cpu.yaml, scripts/k8s-runner-resources/runner-values-1-gpu-h100.yaml, scripts/k8s-runner-resources/runner-values-2-gpu-h100.yaml, scripts/k8s-runner-resources/runner-values-4-gpu-h100.yaml, scripts/k8s-runner-resources/runner-values-4-gpu-general.yaml
Added five Helm values files defining CPU and GPU runner scale sets: pod templates, nodeSelectors/tolerations/affinity, volumes, DIND initContainers, resource limits, and environment variables.
Removed legacy ARC manifests
scripts/k8s-runner-resources/arc-runner-gpu.yaml, scripts/k8s-runner-resources/arc-runner-cpu.yaml, scripts/k8s-runner-resources/arc-runner-autoscaler.yaml, scripts/k8s-runner-resources/arc-runner-rbac.yaml
Deleted legacy RunnerDeployment, HorizontalRunnerAutoscaler, ServiceAccount/Role/RoleBinding manifests for ARC (GPU and CPU runner deployments and autoscalers removed).

Sequence Diagram(s)

sequenceDiagram
  participant GH as GitHub Actions
  participant ARC as ARC Helm/Values
  participant K8s as Kubernetes API
  participant Pod as Runner Pod (Init + DIND)
  GH->>ARC: request runner with label (workflow dispatch)
  ARC->>K8s: create/scale RunnerScaleSet / Pod via ARC controller
  K8s->>Pod: schedule Pod on matching GPU/CPU node
  Pod->>Pod: init-dind-externals (copy externals)
  Pod->>Pod: dind init (dockerd startup)
  Pod->>GH: runner registers and executes job
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related issues

Possibly related PRs

Suggested reviewers

  • CatherineSue
  • key4ng
  • slin1237

Poem

🐰
I hopped through YAML, secrets in paw,
Swapped old manifests for Helm and law,
Four GPUs hum, DIND fluff and spin,
Secrets snug, runners spring within,
A carrot cheer for infra’s win! 🥕

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: migrating from legacy runner deployment to GitHub's official runner scale sets for CI runners.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch xz/move-github-arc

Comment @coderabbitai help to get the list of available commands and usage tips.

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request modernizes the GitHub Actions self-hosted runner infrastructure by transitioning from a legacy CRD-based setup to the officially supported Actions Runner Controller (ARC) runner scale set model. This change leverages Helm charts to define and manage various runner configurations, enhancing the scalability and maintainability of CI/CD workflows within Kubernetes environments.

Highlights

  • Runner Infrastructure Migration: Migrated GitHub Actions self-hosted runners from the legacy CRD-based configuration to the official Actions Runner Controller (ARC) runner scale set model for improved scalability and support.
  • Workflow Label Updates: Updated the nightly-benchmark.yml workflow to utilize new scalar runs-on labels that align with the new runner scale set names.
  • New Helm Value Files: Introduced several new Helm values files to define configurations for various runner types, including CPU-only, 1-GPU H100, 2-GPU H100, 4-GPU H100, and 4-GPU general purpose runners.
  • Comprehensive Deployment Guide: Added a detailed README.md document providing step-by-step instructions for deploying ARC, covering GitHub App setup, secret creation, controller installation, and runner scale set installation.
Changelog
  • .github/workflows/nightly-benchmark.yml
    • Updated runs-on labels for benchmark jobs to use scalar runner scale set names instead of array-style labels.
  • scripts/k8s-runner-resources/README.md
    • Added a comprehensive deployment guide for ARC, detailing GitHub App creation, secret setup, controller, and runner scale set installation, upgrading, and uninstalling procedures.
  • scripts/k8s-runner-resources/arc-secret-template.yaml
    • Added a Kubernetes Secret template for storing GitHub App credentials required by ARC.
  • scripts/k8s-runner-resources/runner-values-1-gpu-h100.yaml
    • Added Helm values for 1x H100 GPU runners, including resource limits, node selectors, and scaling (max 6 runners).
  • scripts/k8s-runner-resources/runner-values-2-gpu-h100.yaml
    • Added Helm values for 2x H100 GPU runners, defining resource limits, node selectors, and scaling (max 6 runners).
  • scripts/k8s-runner-resources/runner-values-4-gpu-general.yaml
    • Added Helm values for 4x GPU runners compatible with H100 or A10 nodes, including node affinity and scaling (min 10 / max 20 runners).
  • scripts/k8s-runner-resources/runner-values-4-gpu-h100.yaml
    • Added Helm values for 4x H100 GPU runners, specifying resource limits, node selectors, and scaling (min 4 / max 8 runners).
  • scripts/k8s-runner-resources/runner-values-cpu.yaml
    • Added Helm values for CPU-only runners, specifying resource requests (8 CPU, 16Gi memory) and scaling parameters (min 4 / max 8 runners).
Ignored Files
  • Ignored by pattern: .github/workflows/** (1)
    • .github/workflows/nightly-benchmark.yml
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩

Signed-off-by: XinyueZhang369 <zoeyzhang369@gmail.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: faacd1fb5f

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread .github/workflows/nightly-benchmark.yml Outdated
needs: build-wheel
if: ${{ !cancelled() }}
runs-on: ["k8s-runner-gpu", "4-gpu-h100"]
runs-on: 4-gpu-h100"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Remove stray quote from multi-worker runs-on label

The multi-worker job now targets runs-on: 4-gpu-h100", which GitHub Actions parses as a literal label containing the trailing quote. With ARC scale sets named 4-gpu-h100, no runner will match this label, so all multi-worker nightly benchmark jobs will stay queued after this change.

Useful? React with 👍 / 👎.

kind: Secret
metadata:
name: github-arc-secret
namespace: actions-runner-systemapp

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Use the correct namespace in ARC secret template

The secret template sets metadata.namespace to actions-runner-systemapp, but the deployment guide creates and installs runner scale sets in actions-runner-system. Following the documented flow, kubectl apply will fail because that namespace does not exist (or the secret will land in the wrong namespace), and ARC will not be able to resolve githubConfigSecret for the runner scale sets.

Useful? React with 👍 / 👎.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request migrates the CI runners to the new GitHub Actions Runner Controller (ARC) scale set model, which is a great improvement, enhancing scalability and aligning with official GitHub support. However, several significant security and configuration concerns have been identified. The Docker-in-Docker (dind) sidecar containers are configured to run in privileged: true mode, granting excessive permissions and posing a substantial risk. They are also incorrectly configured as initContainers, which will prevent runner pods from starting. Furthermore, for DinD setups, it is crucial to disable TLS for the Docker socket by setting DOCKER_TLS_CERTDIR to an empty string. Additionally, there's a namespace typo and feedback to enhance the clarity of the new deployment guide. It is recommended to address these DinD configuration issues and explore more secure alternatives for Docker-in-Docker to minimize risk.

Comment on lines +8 to +10
github_app_id: "2703284"
github_app_installation_id: "105440663"
github_app_private_key: "github-app-private-key"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

critical

This template file contains hardcoded values for github_app_id and github_app_installation_id. Committing secrets or sensitive IDs to the repository is a major security risk, even if they are example values. The file should use placeholders as documented in scripts/k8s-runner-resources/README.md.

  github_app_id: "<your-app-id>"
  github_app_installation_id: "<your-installation-id>"
  github_app_private_key: "<contents-of-your-pem-file>"

kind: Secret
metadata:
name: github-arc-secret
namespace: actions-runner-systemapp

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

high

There is a typo in the namespace. It is actions-runner-systemapp, but all other configuration files and the instructions in README.md use actions-runner-system. This will cause the secret to be created in the wrong namespace, and the ARC controller will not be able to find it.

  namespace: actions-runner-system

image: fra.ocir.io/idqj093njucb/docker:dind
restartPolicy: Always
securityContext:
privileged: true

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

security-medium medium

The dind container is configured with privileged: true, which is a significant security risk as it grants excessive permissions and could lead to container escape, especially for CI runners executing untrusted code. It is also incorrectly configured as an initContainer. initContainers must run to completion, but dockerd is a long-lived process, causing the pod to get stuck in the Init state. The dind container should be moved to the containers section to run as a sidecar. Additionally, restartPolicy: Always is an invalid field for a container specification and should be removed. When using a Docker-in-Docker (DinD) setup, it is necessary to disable TLS for the Docker socket by setting the DOCKER_TLS_CERTDIR environment variable to an empty string. Consider using a more secure alternative for Docker-in-Docker, such as rootless mode or a specialized runtime like Sysbox, to avoid privileged: true.

References
  1. When using a Docker-in-Docker (DinD) setup, it is necessary to disable TLS for the Docker socket by setting the DOCKER_TLS_CERTDIR environment variable to an empty string.

image: fra.ocir.io/idqj093njucb/docker:dind
restartPolicy: Always
securityContext:
privileged: true

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

security-medium medium

The dind container is configured with privileged: true, which is a significant security risk as it grants excessive permissions and could lead to container escape, especially for CI runners executing untrusted code. It is also incorrectly configured as an initContainer. initContainers must run to completion, but dockerd is a long-lived process, causing the pod to get stuck in the Init state. The dind container should be moved to the containers section to run as a sidecar. Additionally, restartPolicy: Always is an invalid field for a container specification and should be removed. When using a Docker-in-Docker (DinD) setup, it is necessary to disable TLS for the Docker socket by setting the DOCKER_TLS_CERTDIR environment variable to an empty string. Consider using a more secure alternative for Docker-in-Docker, such as rootless mode or a specialized runtime like Sysbox, to avoid privileged: true.

References
  1. When using a Docker-in-Docker (DinD) setup, it is necessary to disable TLS for the Docker socket by setting the DOCKER_TLS_CERTDIR environment variable to an empty string.

image: fra.ocir.io/idqj093njucb/docker:dind
restartPolicy: Always
securityContext:
privileged: true

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

security-medium medium

The dind container is configured with privileged: true, which is a significant security risk as it grants excessive permissions and could lead to container escape, especially for CI runners executing untrusted code. It is also incorrectly configured as an initContainer. initContainers must run to completion, but dockerd is a long-lived process, causing the pod to get stuck in the Init state. The dind container should be moved to the containers section to run as a sidecar. Additionally, restartPolicy: Always is an invalid field for a container specification and should be removed. When using a Docker-in-Docker (DinD) setup, it is necessary to disable TLS for the Docker socket by setting the DOCKER_TLS_CERTDIR environment variable to an empty string. Consider using a more secure alternative for Docker-in-Docker, such as rootless mode or a specialized runtime like Sysbox, to avoid privileged: true.

References
  1. When using a Docker-in-Docker (DinD) setup, it is necessary to disable TLS for the Docker socket by setting the DOCKER_TLS_CERTDIR environment variable to an empty string.

image: fra.ocir.io/idqj093njucb/docker:dind
restartPolicy: Always
securityContext:
privileged: true

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

security-medium medium

The dind container is configured with privileged: true, which is a significant security risk as it grants excessive permissions and could lead to container escape, especially for CI runners executing untrusted code. It is also incorrectly configured as an initContainer. initContainers must run to completion, but dockerd is a long-lived process, causing the pod to get stuck in the Init state. The dind container should be moved to the containers section to run as a sidecar. Additionally, restartPolicy: Always is an invalid field for a container specification and should be removed. When using a Docker-in-Docker (DinD) setup, it is necessary to disable TLS for the Docker socket by setting the DOCKER_TLS_CERTDIR environment variable to an empty string. Consider using a more secure alternative for Docker-in-Docker, such as rootless mode or a specialized runtime like Sysbox, to avoid privileged: true.

References
  1. When using a Docker-in-Docker (DinD) setup, it is necessary to disable TLS for the Docker socket by setting the DOCKER_TLS_CERTDIR environment variable to an empty string.

image: fra.ocir.io/idqj093njucb/docker:dind
restartPolicy: Always
securityContext:
privileged: true

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

security-medium medium

The dind container is configured with privileged: true, which is a significant security risk as it grants excessive permissions and could lead to container escape, especially for CI runners executing untrusted code. It is also incorrectly configured as an initContainer. initContainers must run to completion, but dockerd is a long-lived process, causing the pod to get stuck in the Init state. The dind container should be moved to the containers section to run as a sidecar. Additionally, restartPolicy: Always is an invalid field for a container specification and should be removed. When using a Docker-in-Docker (DinD) setup, it is necessary to disable TLS for the Docker socket by setting the DOCKER_TLS_CERTDIR environment variable to an empty string. Consider using a more secure alternative for Docker-in-Docker, such as rootless mode or a specialized runtime like Sysbox, to avoid privileged: true.

References
  1. When using a Docker-in-Docker (DinD) setup, it is necessary to disable TLS for the Docker socket by setting the DOCKER_TLS_CERTDIR environment variable to an empty string.


```bash
kubectl create namespace actions-runner-system
kubectl apply -f scripts/k8s-runner-resources/arc-secret-template.yaml

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The file path scripts/k8s-runner-resources/arc-secret-template.yaml is relative to the repository root. This also applies to the paths used in the helm install commands below. It would be clearer to instruct the user to run these commands from the root of the repository to avoid 'file not found' errors. Consider adding a note at the beginning of the section, for example: Note: All commands should be run from the root of the repository.

Signed-off-by: XinyueZhang369 <zoeyzhang369@gmail.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/nightly-benchmark.yml:
- Line 191: The runs-on value in the GitHub Actions workflow is malformed: the
string for the runner label in the runs-on key (runs-on) contains an extra
trailing double-quote (`4-gpu-h100"`). Edit the workflow so the runs-on entry
uses the correct label without the stray quote (e.g., change the runs-on value
to 4-gpu-h100 or a properly quoted "self-hosted", "4-gpu-h100" as appropriate)
to restore proper runner matching for the job.

In `@scripts/k8s-runner-resources/arc-secret-template.yaml`:
- Line 5: The Secret's namespace is wrong: change the metadata namespace value
from "actions-runner-systemapp" to "actions-runner-system" so the
github-arc-secret is created in the same namespace used by ARC components and
runner scale sets; update the Namespace field (the "namespace:" entry /
metadata.namespace for the Secret) accordingly to match the documented
actions-runner-system namespace.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: f9dbe75b-96b9-41f4-96fc-9b20c1daa033

📥 Commits

Reviewing files that changed from the base of the PR and between ae6b424 and faacd1f.

📒 Files selected for processing (8)
  • .github/workflows/nightly-benchmark.yml
  • scripts/k8s-runner-resources/README.md
  • scripts/k8s-runner-resources/arc-secret-template.yaml
  • scripts/k8s-runner-resources/runner-values-1-gpu-h100.yaml
  • scripts/k8s-runner-resources/runner-values-2-gpu-h100.yaml
  • scripts/k8s-runner-resources/runner-values-4-gpu-general.yaml
  • scripts/k8s-runner-resources/runner-values-4-gpu-h100.yaml
  • scripts/k8s-runner-resources/runner-values-cpu.yaml

Comment thread .github/workflows/nightly-benchmark.yml Outdated
Comment thread scripts/k8s-runner-resources/arc-secret-template.yaml Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@scripts/k8s-runner-resources/arc-secret-template.yaml`:
- Around line 8-10: Replace the concrete-looking values for the GitHub app
fields with explicit placeholders: change github_app_id and
github_app_installation_id to clear tokens like <GITHUB_APP_ID> and
<GITHUB_APP_INSTALLATION_ID>, and ensure github_app_private_key is a descriptive
placeholder (e.g. <GITHUB_APP_PRIVATE_KEY>) so the template’s keys
(github_app_id, github_app_installation_id, github_app_private_key) cannot be
mistaken for real IDs across environments.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 5751b111-7b26-485f-a9d1-f95efb1fd16f

📥 Commits

Reviewing files that changed from the base of the PR and between faacd1f and 8ec269e.

📒 Files selected for processing (6)
  • .github/workflows/nightly-benchmark.yml
  • scripts/k8s-runner-resources/arc-runner-autoscaler.yaml
  • scripts/k8s-runner-resources/arc-runner-cpu.yaml
  • scripts/k8s-runner-resources/arc-runner-gpu.yaml
  • scripts/k8s-runner-resources/arc-runner-rbac.yaml
  • scripts/k8s-runner-resources/arc-secret-template.yaml
💤 Files with no reviewable changes (4)
  • scripts/k8s-runner-resources/arc-runner-cpu.yaml
  • scripts/k8s-runner-resources/arc-runner-rbac.yaml
  • scripts/k8s-runner-resources/arc-runner-gpu.yaml
  • scripts/k8s-runner-resources/arc-runner-autoscaler.yaml

Comment on lines +8 to +10
github_app_id: "2703284"
github_app_installation_id: "105440663"
github_app_private_key: "github-app-private-key"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick | 🔵 Trivial

Use explicit placeholders instead of concrete IDs in the template.

For a reusable template, concrete-looking IDs on Lines 8-9 can cause accidental misconfiguration across environments. Prefer obvious placeholders (for example <GITHUB_APP_ID> and <GITHUB_APP_INSTALLATION_ID>).

Suggested template tweak
 stringData:
-  github_app_id: "2703284"
-  github_app_installation_id: "105440663"
-  github_app_private_key: "github-app-private-key"
+  github_app_id: "<GITHUB_APP_ID>"
+  github_app_installation_id: "<GITHUB_APP_INSTALLATION_ID>"
+  github_app_private_key: "<GITHUB_APP_PRIVATE_KEY_PEM>"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
github_app_id: "2703284"
github_app_installation_id: "105440663"
github_app_private_key: "github-app-private-key"
github_app_id: "<GITHUB_APP_ID>"
github_app_installation_id: "<GITHUB_APP_INSTALLATION_ID>"
github_app_private_key: "<GITHUB_APP_PRIVATE_KEY_PEM>"
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@scripts/k8s-runner-resources/arc-secret-template.yaml` around lines 8 - 10,
Replace the concrete-looking values for the GitHub app fields with explicit
placeholders: change github_app_id and github_app_installation_id to clear
tokens like <GITHUB_APP_ID> and <GITHUB_APP_INSTALLATION_ID>, and ensure
github_app_private_key is a descriptive placeholder (e.g.
<GITHUB_APP_PRIVATE_KEY>) so the template’s keys (github_app_id,
github_app_installation_id, github_app_private_key) cannot be mistaken for real
IDs across environments.

Signed-off-by: XinyueZhang369 <zoeyzhang369@gmail.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@scripts/k8s-runner-resources/runner-values-1-gpu-h100.yaml`:
- Around line 62-75: The runner pod only sets a GPU limit and lacks
CPU/memory/ephemeral-storage requests/limits (and the dind container has no
resource bounds), causing scheduling/eviction risk; update the resources block
for the runner container (container name "runner") to include explicit requests
and limits for cpu, memory and ephemeral-storage, and add a similar resources
block for the dind container (container name "dind") with sane request/limit
values for CPU, memory and ephemeral-storage; ensure both containers include
both requests and limits so the kube-scheduler and eviction logic can operate
predictably.
- Around line 59-60: The emptyDir used for the volume named "docker-storage" is
unbounded and can let Docker layer storage consume all node ephemeral disk;
update the volume spec for name: docker-storage to bound ephemeral storage
(e.g., add emptyDir.sizeLimit with an appropriate value such as "20Gi") or
switch to a disk-backed alternative if required, ensuring the change is made on
the volume named "docker-storage" in the manifest so runner nodes cannot be
destabilized by unbounded image layers.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 0e865404-c242-428f-b872-913477c7455b

📥 Commits

Reviewing files that changed from the base of the PR and between 8ec269e and 159bbd0.

📒 Files selected for processing (1)
  • scripts/k8s-runner-resources/runner-values-1-gpu-h100.yaml

Comment on lines +59 to +60
- name: docker-storage
emptyDir: {}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Bound docker-storage to prevent node disk exhaustion.

emptyDir for Docker layer storage is unbounded here; heavy image builds can fill node ephemeral disk and destabilize runner nodes.

Suggested fix
       - name: docker-storage
-        emptyDir: {}
+        emptyDir:
+          sizeLimit: 200Gi
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- name: docker-storage
emptyDir: {}
- name: docker-storage
emptyDir:
sizeLimit: 200Gi
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@scripts/k8s-runner-resources/runner-values-1-gpu-h100.yaml` around lines 59 -
60, The emptyDir used for the volume named "docker-storage" is unbounded and can
let Docker layer storage consume all node ephemeral disk; update the volume spec
for name: docker-storage to bound ephemeral storage (e.g., add
emptyDir.sizeLimit with an appropriate value such as "20Gi") or switch to a
disk-backed alternative if required, ensuring the change is made on the volume
named "docker-storage" in the manifest so runner nodes cannot be destabilized by
unbounded image layers.

Comment on lines +62 to +75
containers:
- name: runner
image: fra.ocir.io/idqj093njucb/action-runner:v0.0.2
command:
- /home/runner/run.sh
env:
- name: DOCKER_HOST
value: unix:///var/run/docker.sock
- name: RUNNER_WAIT_FOR_DOCKER_IN_SECONDS
value: '120'
resources:
limits:
nvidia.com/gpu: 1
volumeMounts:

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Add CPU/memory/ephemeral-storage requests and limits for runner + dind.

Currently only GPU limit is set on the runner, and dind has no resource bounds. This risks scheduling contention and evictions under parallel CI load.

Suggested fix
     containers:
       - name: runner
         image: fra.ocir.io/idqj093njucb/action-runner:v0.0.2
@@
         resources:
+          requests:
+            cpu: "4"
+            memory: "16Gi"
+            ephemeral-storage: "40Gi"
           limits:
+            cpu: "8"
+            memory: "32Gi"
+            ephemeral-storage: "120Gi"
             nvidia.com/gpu: 1
@@
     initContainers:
@@
       - name: dind
@@
+        resources:
+          requests:
+            cpu: "2"
+            memory: "8Gi"
+            ephemeral-storage: "40Gi"
+          limits:
+            cpu: "4"
+            memory: "16Gi"
+            ephemeral-storage: "120Gi"

Also applies to: 99-119

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@scripts/k8s-runner-resources/runner-values-1-gpu-h100.yaml` around lines 62 -
75, The runner pod only sets a GPU limit and lacks CPU/memory/ephemeral-storage
requests/limits (and the dind container has no resource bounds), causing
scheduling/eviction risk; update the resources block for the runner container
(container name "runner") to include explicit requests and limits for cpu,
memory and ephemeral-storage, and add a similar resources block for the dind
container (container name "dind") with sane request/limit values for CPU, memory
and ephemeral-storage; ensure both containers include both requests and limits
so the kube-scheduler and eviction logic can operate predictably.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 159bbd0a06

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

stringData:
github_app_id: "2703284"
github_app_installation_id: "105440663"
github_app_private_key: "github-app-private-key"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Preserve PEM newlines in GitHub App secret

The template stores github_app_private_key as a double-quoted scalar, but this key is a multi-line PEM; if operators follow the README and paste the PEM contents here, YAML folds embedded line breaks into spaces, so ARC receives an invalid private key and cannot authenticate to GitHub to create runner registration tokens. Use a literal block scalar (e.g. |) or escaped \n formatting so the original line breaks are preserved.

Useful? React with 👍 / 👎.

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

Labels

ci CI/CD configuration changes documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants