Skip to content

Commit faaca10

Browse files
author
Yusuke Kuoka
authored
Rename Runner.Spec.dockerWithinRunnerContainer to docker"d"WithinRunnerContainer (#134)
* Rename Runner.Spec.dockerWithinRunnerContainer to dockerdWithinRunnerContainer Ref #126 (comment)
1 parent d16dfac commit faaca10

File tree

7 files changed

+14
-14
lines changed

7 files changed

+14
-14
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ spec:
265265
template:
266266
spec:
267267
image: summerwind/actions-runner-dind
268-
dockerWithinRunnerContainer: true
268+
dockerdWithinRunnerContainer: true
269269
repository: mumoshu/actions-runner-controller-ci
270270
env: []
271271
```
@@ -306,8 +306,8 @@ spec:
306306
memory: "4Gi"
307307
# If set to true, runner pod container only 1 container that's expected to be able to run docker, too.
308308
# image summerwind/actions-runner-dind or custom one should be used with true -value
309-
dockerWithinRunnerContainer: false
310-
# Valid if dockerWithinRunnerContainer is not true
309+
dockerdWithinRunnerContainer: false
310+
# Valid if dockerdWithinRunnerContainer is not true
311311
dockerdContainerResources:
312312
limits:
313313
cpu: "4.0"

api/v1alpha1/runner_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ type RunnerSpec struct {
8080
// +optional
8181
TerminationGracePeriodSeconds *int64 `json:"terminationGracePeriodSeconds,omitempty"`
8282
// +optional
83-
DockerWithinRunnerContainer *bool `json:"dockerWithinRunnerContainer,omitempty"`
83+
DockerdWithinRunnerContainer *bool `json:"dockerdWithinRunnerContainer,omitempty"`
8484
}
8585

8686
// ValidateRepository validates repository field.

api/v1alpha1/zz_generated.deepcopy.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/crd/bases/actions.summerwind.dev_runnerdeployments.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -399,8 +399,6 @@ spec:
399399
- name
400400
type: object
401401
type: array
402-
dockerWithinRunnerContainer:
403-
type: boolean
404402
dockerdContainerResources:
405403
description: ResourceRequirements describes the compute resource requirements.
406404
properties:
@@ -423,6 +421,8 @@ spec:
423421
description: 'Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/'
424422
type: object
425423
type: object
424+
dockerdWithinRunnerContainer:
425+
type: boolean
426426
env:
427427
items:
428428
description: EnvVar represents an environment variable present in a Container.

config/crd/bases/actions.summerwind.dev_runnerreplicasets.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -399,8 +399,6 @@ spec:
399399
- name
400400
type: object
401401
type: array
402-
dockerWithinRunnerContainer:
403-
type: boolean
404402
dockerdContainerResources:
405403
description: ResourceRequirements describes the compute resource requirements.
406404
properties:
@@ -423,6 +421,8 @@ spec:
423421
description: 'Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/'
424422
type: object
425423
type: object
424+
dockerdWithinRunnerContainer:
425+
type: boolean
426426
env:
427427
items:
428428
description: EnvVar represents an environment variable present in a Container.

config/crd/bases/actions.summerwind.dev_runners.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -393,8 +393,6 @@ spec:
393393
- name
394394
type: object
395395
type: array
396-
dockerWithinRunnerContainer:
397-
type: boolean
398396
dockerdContainerResources:
399397
description: ResourceRequirements describes the compute resource requirements.
400398
properties:
@@ -417,6 +415,8 @@ spec:
417415
description: 'Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/'
418416
type: object
419417
type: object
418+
dockerdWithinRunnerContainer:
419+
type: boolean
420420
env:
421421
items:
422422
description: EnvVar represents an environment variable present in a Container.

controllers/runner_controller.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ func (r *RunnerReconciler) unregisterRunner(ctx context.Context, org, repo, name
279279
func (r *RunnerReconciler) newPod(runner v1alpha1.Runner) (corev1.Pod, error) {
280280
var (
281281
privileged bool = true
282-
dockerdInRunner bool = runner.Spec.DockerWithinRunnerContainer != nil && *runner.Spec.DockerWithinRunnerContainer
282+
dockerdInRunner bool = runner.Spec.DockerdWithinRunnerContainer != nil && *runner.Spec.DockerdWithinRunnerContainer
283283
)
284284

285285
runnerImage := runner.Spec.Image
@@ -338,7 +338,7 @@ func (r *RunnerReconciler) newPod(runner v1alpha1.Runner) (corev1.Pod, error) {
338338
EnvFrom: runner.Spec.EnvFrom,
339339
SecurityContext: &corev1.SecurityContext{
340340
// Runner need to run privileged if it contains DinD
341-
Privileged: runner.Spec.DockerWithinRunnerContainer,
341+
Privileged: runner.Spec.DockerdWithinRunnerContainer,
342342
},
343343
Resources: runner.Spec.Resources,
344344
},

0 commit comments

Comments
 (0)