(feat) Rootless dind mode by alexrecuenco · Pull Request #4541 · actions/actions-runner-controller · GitHub
Skip to content

(feat) Rootless dind mode#4541

Open
alexrecuenco wants to merge 1 commit into
actions:masterfrom
alexrecuenco:feature/rootless-dind
Open

(feat) Rootless dind mode#4541
alexrecuenco wants to merge 1 commit into
actions:masterfrom
alexrecuenco:feature/rootless-dind

Conversation

@alexrecuenco

Copy link
Copy Markdown

Currently we can't overwrite the dind deployment to use rootless mode, this updates the dind deployment to use rootless mode instead of privileged mode when required

Currently we cant overwrite the dind deployment to use rootless mode, this updates the dind deployment to use rootless mode instead of privileged mode
@alexrecuenco

Copy link
Copy Markdown
Author

Copilot AI 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.

Pull request overview

This PR adds a containerMode.rootless option to the gha-runner-scale-set Helm chart so that, when using containerMode.type=dind, the chart can render a Docker-in-Docker sidecar using a rootless image and without privileged mode.

Changes:

  • Document a new containerMode.rootless values option for dind mode.
  • Render the dind container image as docker:dind-rootless when rootless is enabled.
  • Switch the dind container securityContext from privileged: true to a non-privileged configuration for rootless mode (including Unconfined seccomp/AppArmor settings).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
charts/gha-runner-scale-set/values.yaml Documents the new containerMode.rootless option and its intended security posture.
charts/gha-runner-scale-set/templates/_helpers.tpl Implements conditional rendering for rootless dind image + securityContext.

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

Comment on lines +123 to +131
{{- if $rootless }}
privileged: false
appArmorProfile:
type: Unconfined
seccompProfile:
type: Unconfined
{{- else }}
privileged: true
{{- end }}
Comment on lines +113 to +114
{{- $rootless := and .Values.containerMode (.Values.containerMode.rootless) }}
image: {{ if $rootless }}docker:dind-rootless{{ else }}docker:dind{{ end }}
Comment on lines +121 to +124
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants