add dockerEnabled option (#191)

Add dockerEnabled option for users who does not need docker and want not to run privileged container.
if `dockerEnabled == false`, dind container not run, and there are no privileged container.

Do the same as closed #96
This commit is contained in:
Shinnosuke Sawada
2020-11-16 09:41:12 +09:00
committed by GitHub
parent 1fd752fca2
commit 4371de9733
9 changed files with 21 additions and 1 deletions

View File

@@ -299,6 +299,7 @@ func (r *RunnerReconciler) newPod(runner v1alpha1.Runner) (corev1.Pod, error) {
var (
privileged bool = true
dockerdInRunner bool = runner.Spec.DockerdWithinRunnerContainer != nil && *runner.Spec.DockerdWithinRunnerContainer
dockerEnabled bool = runner.Spec.DockerEnabled == nil || *runner.Spec.DockerEnabled
)
runnerImage := runner.Spec.Image
@@ -373,7 +374,7 @@ func (r *RunnerReconciler) newPod(runner v1alpha1.Runner) (corev1.Pod, error) {
},
}
if !dockerdInRunner {
if !dockerdInRunner && dockerEnabled {
pod.Spec.Volumes = []corev1.Volume{
{
Name: "work",