Rename Runner.Spec.dockerWithinRunnerContainer to docker"d"WithinRunnerContainer (#134)
* Rename Runner.Spec.dockerWithinRunnerContainer to dockerdWithinRunnerContainer Ref https://github.com/summerwind/actions-runner-controller/pull/126#issuecomment-712501790
This commit is contained in:
parent
d16dfac0f8
commit
faaca10fba
|
|
@ -265,7 +265,7 @@ spec:
|
|||
template:
|
||||
spec:
|
||||
image: summerwind/actions-runner-dind
|
||||
dockerWithinRunnerContainer: true
|
||||
dockerdWithinRunnerContainer: true
|
||||
repository: mumoshu/actions-runner-controller-ci
|
||||
env: []
|
||||
```
|
||||
|
|
@ -306,8 +306,8 @@ spec:
|
|||
memory: "4Gi"
|
||||
# If set to true, runner pod container only 1 container that's expected to be able to run docker, too.
|
||||
# image summerwind/actions-runner-dind or custom one should be used with true -value
|
||||
dockerWithinRunnerContainer: false
|
||||
# Valid if dockerWithinRunnerContainer is not true
|
||||
dockerdWithinRunnerContainer: false
|
||||
# Valid if dockerdWithinRunnerContainer is not true
|
||||
dockerdContainerResources:
|
||||
limits:
|
||||
cpu: "4.0"
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ type RunnerSpec struct {
|
|||
// +optional
|
||||
TerminationGracePeriodSeconds *int64 `json:"terminationGracePeriodSeconds,omitempty"`
|
||||
// +optional
|
||||
DockerWithinRunnerContainer *bool `json:"dockerWithinRunnerContainer,omitempty"`
|
||||
DockerdWithinRunnerContainer *bool `json:"dockerdWithinRunnerContainer,omitempty"`
|
||||
}
|
||||
|
||||
// ValidateRepository validates repository field.
|
||||
|
|
|
|||
|
|
@ -525,8 +525,8 @@ func (in *RunnerSpec) DeepCopyInto(out *RunnerSpec) {
|
|||
*out = new(int64)
|
||||
**out = **in
|
||||
}
|
||||
if in.DockerWithinRunnerContainer != nil {
|
||||
in, out := &in.DockerWithinRunnerContainer, &out.DockerWithinRunnerContainer
|
||||
if in.DockerdWithinRunnerContainer != nil {
|
||||
in, out := &in.DockerdWithinRunnerContainer, &out.DockerdWithinRunnerContainer
|
||||
*out = new(bool)
|
||||
**out = **in
|
||||
}
|
||||
|
|
|
|||
|
|
@ -399,8 +399,6 @@ spec:
|
|||
- name
|
||||
type: object
|
||||
type: array
|
||||
dockerWithinRunnerContainer:
|
||||
type: boolean
|
||||
dockerdContainerResources:
|
||||
description: ResourceRequirements describes the compute resource requirements.
|
||||
properties:
|
||||
|
|
@ -423,6 +421,8 @@ spec:
|
|||
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/'
|
||||
type: object
|
||||
type: object
|
||||
dockerdWithinRunnerContainer:
|
||||
type: boolean
|
||||
env:
|
||||
items:
|
||||
description: EnvVar represents an environment variable present in a Container.
|
||||
|
|
|
|||
|
|
@ -399,8 +399,6 @@ spec:
|
|||
- name
|
||||
type: object
|
||||
type: array
|
||||
dockerWithinRunnerContainer:
|
||||
type: boolean
|
||||
dockerdContainerResources:
|
||||
description: ResourceRequirements describes the compute resource requirements.
|
||||
properties:
|
||||
|
|
@ -423,6 +421,8 @@ spec:
|
|||
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/'
|
||||
type: object
|
||||
type: object
|
||||
dockerdWithinRunnerContainer:
|
||||
type: boolean
|
||||
env:
|
||||
items:
|
||||
description: EnvVar represents an environment variable present in a Container.
|
||||
|
|
|
|||
|
|
@ -393,8 +393,6 @@ spec:
|
|||
- name
|
||||
type: object
|
||||
type: array
|
||||
dockerWithinRunnerContainer:
|
||||
type: boolean
|
||||
dockerdContainerResources:
|
||||
description: ResourceRequirements describes the compute resource requirements.
|
||||
properties:
|
||||
|
|
@ -417,6 +415,8 @@ spec:
|
|||
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/'
|
||||
type: object
|
||||
type: object
|
||||
dockerdWithinRunnerContainer:
|
||||
type: boolean
|
||||
env:
|
||||
items:
|
||||
description: EnvVar represents an environment variable present in a Container.
|
||||
|
|
|
|||
|
|
@ -279,7 +279,7 @@ func (r *RunnerReconciler) unregisterRunner(ctx context.Context, org, repo, name
|
|||
func (r *RunnerReconciler) newPod(runner v1alpha1.Runner) (corev1.Pod, error) {
|
||||
var (
|
||||
privileged bool = true
|
||||
dockerdInRunner bool = runner.Spec.DockerWithinRunnerContainer != nil && *runner.Spec.DockerWithinRunnerContainer
|
||||
dockerdInRunner bool = runner.Spec.DockerdWithinRunnerContainer != nil && *runner.Spec.DockerdWithinRunnerContainer
|
||||
)
|
||||
|
||||
runnerImage := runner.Spec.Image
|
||||
|
|
@ -338,7 +338,7 @@ func (r *RunnerReconciler) newPod(runner v1alpha1.Runner) (corev1.Pod, error) {
|
|||
EnvFrom: runner.Spec.EnvFrom,
|
||||
SecurityContext: &corev1.SecurityContext{
|
||||
// Runner need to run privileged if it contains DinD
|
||||
Privileged: runner.Spec.DockerWithinRunnerContainer,
|
||||
Privileged: runner.Spec.DockerdWithinRunnerContainer,
|
||||
},
|
||||
Resources: runner.Spec.Resources,
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue