feat: Support arbitrarily setting privileged: true
for runner container
#1383
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
You can now override the securityContext.privileged per container in both RunnerDeployment and RunnerSet, by specifying it in the
containers
field for the specifically named container.In case you'd like to run privileged operations from within your Actions workflow jobs, you'd want to just enable privileged on the
runner
container:The default
privileged
value for therunner
container isfalse
as you may know, but the above setting overrides it totrue
.To be precise, you were already able to imply
privileged: true
for therunner
container by enablingdockerdWithinRunnerContainer
. But that implies you still rundockerd
within therunner
container, which can be unnecessary depending on your use-case. That's where this new setting comes handy.Note that you can also utilize the same pattern in RunnerSet, too.
In case you'd like to disable
docker
(thedocker
sidecar) at all, you'd need to set the existingdockerEnabled
too, underspec.template.spec
for RunnerDeployment and underspec
forRunnerSet
.Resolves #1282