Provide support to configure privileged containers per playground

This commit is contained in:
Marcos Lilljedahl
2020-10-25 19:21:31 -03:00
parent f9800927fe
commit e8486b8100
5 changed files with 92 additions and 4 deletions

View File

@@ -55,6 +55,12 @@ func NewInstance(rw http.ResponseWriter, req *http.Request) {
body.DindVolumeSize = playground.DindVolumeSize
}
// TODO I don't like how this is implemented here. NewInstance
// should be a function that's in the Playground struct.
if playground.Privileged {
body.Privileged = true
}
i, err := core.InstanceNew(s, body)
if err != nil {
if provisioner.OutOfCapacity(err) {