Move DindVolumeSize to playground opts

This commit is contained in:
Marcos Lilljedahl
2019-04-23 01:47:06 -03:00
parent 1bee95e862
commit 4b1dc52c59
11 changed files with 65 additions and 41 deletions

View File

@@ -15,7 +15,7 @@ func NewInstance(rw http.ResponseWriter, req *http.Request) {
vars := mux.Vars(req)
sessionId := vars["sessionId"]
body := types.InstanceConfig{PlaygroundFQDN: req.Host}
body := types.InstanceConfig{PlaygroundFQDN: req.Host, DindVolumeSize: "5G"}
json.NewDecoder(req.Body).Decode(&body)
@@ -51,6 +51,10 @@ func NewInstance(rw http.ResponseWriter, req *http.Request) {
return
}
if len(playground.DindVolumeSize) > 0 {
body.DindVolumeSize = playground.DindVolumeSize
}
i, err := core.InstanceNew(s, body)
if err != nil {
if provisioner.OutOfCapacity(err) {