actions / actions-runner-controller

Kubernetes controller for GitHub Actions self-hosted runners
Apache License 2.0
4.41k stars 1.04k forks source link

Change dind default image #3439

Closed romankydybets closed 2 months ago

romankydybets commented 2 months ago

Checks

Controller Version

0.7.0

Deployment Method

Helm

Checks

To Reproduce

Intall with values file below helm chart

Describe the bug

according to this part configuration https://github.com/actions/actions-runner-controller/blob/master/charts/gha-runner-scale-set/values.yaml#L134-L135 i could change it for example to any dind image through the values, but unfortunately it defined inside the helper so no options to override https://github.com/actions/actions-runner-controller/blob/master/charts/gha-runner-scale-set/templates/_helpers.tpl#L98-L99 do anyone have ideas how to handle such situation?

Describe the expected behavior

i would like to provide my custom image through the values.

Additional Context

minRunners: 0
maxRunners: 50
containerMode:
  type: "dind"
template:
  spec:
    affinity:
      nodeAffinity:
        requiredDuringSchedulingIgnoredDuringExecution:
          nodeSelectorTerms:
            - matchExpressions:
                - key: node.kubernetes.io/lifecycle
                  operator: In
                  values:
                    - arc-arm64
    containers:
    - name: runner
      image: <runner-image>:2.314.1
      imagePullPolicy: IfNotPresent
      command: ["/home/runner/run.sh"]
      env:
        - name: DOCKER_HOST
          value: unix:///run/docker/docker.sock
      volumeMounts:
        - name: work
          mountPath: /home/runner/_work
        - name: dind-sock
          mountPath: /run/docker
          readOnly: true
      resources:
        requests:
          cpu: 4
          memory: 8Gi
    - name: dind
      image: <dind-repo>:dind
      args:
        - dockerd
        - --host=unix:///run/docker/docker.sock
        - --group=$(DOCKER_GROUP_GID)
      env:
        - name: DOCKER_GROUP_GID
          value: "123"
      resources:
        requests:
          cpu: 4
          memory: 8Gi
      securityContext:
        privileged: true
      volumeMounts:
        - name: work
          mountPath: /home/runner/_work
        - name: dind-sock
          mountPath: /run/docker
        - name: dind-externals
          mountPath: /home/runner/externals
    volumes:
    - name: work
      emptyDir: {}
flags:
  logLevel: "debug"
  logFormat: "text"

Controller Logs

The are not additional logs, we just heat the limit of pull images

Runner Pod Logs

The are not additional logs, we just heat the limit of pull images
github-actions[bot] commented 2 months ago

Hello! Thank you for filing an issue.

The maintainers will triage your issue shortly.

In the meantime, please take a look at the troubleshooting guide for bug reports.

If this is a feature request, please review our contribution guidelines.

nikola-jokic commented 2 months ago

Hey @romankydybets,

We have documented here that:

To customize the spec, comment out or remove containerMode, and append the configuration you want in the template section.

romankydybets commented 3 weeks ago

Hey @nikola-jokic, Thank you. Appreciated. I have tested it out, everything went smoothly.