Skip to content

gha-runner-scale-set: overriding template.spec.containers to set resources on the runner container drops the default image/command #4591

Description

@madriaanse377

Controller Version

0.13.1 (also reproduced on current master)

Helm Chart Version

gha-runner-scale-set 0.13.1

Deployment Method

Helm

Checks

  • This isn't a question or user support case
  • I've read the releasenotes before submitting this issue
  • I've already upgraded ARC (including the CRDs) to the latest version and I still see this bug

To Reproduce

Override template.spec.containers to set only resources on the runner container (a common need when a namespace ResourceQuota requires every pod to declare requests.cpu/requests.memory/limits.memory):

template:
  spec:
    containers:
    - name: runner
      resources:
        limits:
          memory: "2Gi"
        requests:
          cpu: "50m"
          memory: "50Mi"

Describe the bug

The rendered AutoscalingRunnerSet's runner container has no image or command at all -- both are silently dropped. The resulting pod fails admission outright:

Pod "my-runner" is invalid: spec.containers[0].image: Required value

Root cause: Helm replaces list values wholesale rather than merging list items, so a user-supplied template.spec.containers entry for runner fully replaces the chart's default container object (which sets image: ghcr.io/actions/actions-runner:latest and command: ["/home/runner/run.sh"] in values.yaml). Every runner-container render path in _helpers.tpl (default, dind, kubernetes, kubernetes-novolume) only re-emits the keys the user explicitly supplied, with no fallback to the chart's own default for whatever's missing.

Describe the expected behavior

Setting only resources (or any other single field) on the runner container should not silently drop image/command -- the chart should fall back to its own defaults for anything the user's override doesn't set.

Additional context

I have a fix drafted and tested (all 4 modes, plus a regression guard confirming a user-supplied custom image is never paired with a forced default command): #4590

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions