Run pod in a privileged securityContext.

This is necessary in order to access devices from the pod.
The target is to be able to run resize2fs on a pod itself.
This commit is contained in:
Oleksii Kliukin 2017-04-04 16:52:52 +02:00 committed by Murat Kabilov
parent 701fa729de
commit 19dfa0c2b0
1 changed files with 4 additions and 1 deletions

View File

@ -105,7 +105,7 @@ bootstrap:
- hostssl all all all md5`, pgVersion, c.OpConfig.PamRoleName, c.OpConfig.PamRoleName), - hostssl all all all md5`, pgVersion, c.OpConfig.PamRoleName, c.OpConfig.PamRoleName),
}, },
} }
privilegedMode := bool(true)
container := v1.Container{ container := v1.Container{
Name: c.Metadata.Name, Name: c.Metadata.Name,
Image: c.OpConfig.DockerImage, Image: c.OpConfig.DockerImage,
@ -134,6 +134,9 @@ bootstrap:
}, },
}, },
Env: envVars, Env: envVars,
SecurityContext: &v1.SecurityContext{
Privileged: &privilegedMode,
},
} }
terminateGracePeriodSeconds := int64(30) terminateGracePeriodSeconds := int64(30)