Send privileged flag to stack creation and session setup
This commit is contained in:
@@ -34,6 +34,7 @@ func SessionSetup(rw http.ResponseWriter, req *http.Request) {
|
|||||||
body.DindVolumeSize = playground.DindVolumeSize
|
body.DindVolumeSize = playground.DindVolumeSize
|
||||||
}
|
}
|
||||||
|
|
||||||
|
body.Privileged = playground.Privileged
|
||||||
err = core.SessionSetup(s, body)
|
err = core.SessionSetup(s, body)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if pwd.SessionNotEmpty(err) {
|
if pwd.SessionNotEmpty(err) {
|
||||||
|
|||||||
@@ -46,6 +46,7 @@ type SessionSetupConf struct {
|
|||||||
Instances []SessionSetupInstanceConf `json:"instances"`
|
Instances []SessionSetupInstanceConf `json:"instances"`
|
||||||
PlaygroundFQDN string
|
PlaygroundFQDN string
|
||||||
DindVolumeSize string
|
DindVolumeSize string
|
||||||
|
Privileged bool
|
||||||
}
|
}
|
||||||
|
|
||||||
type SessionSetupInstanceConf struct {
|
type SessionSetupInstanceConf struct {
|
||||||
@@ -188,7 +189,7 @@ func (p *pwd) SessionDeployStack(s *types.Session) error {
|
|||||||
|
|
||||||
s.Ready = false
|
s.Ready = false
|
||||||
p.event.Emit(event.SESSION_READY, s.Id, false)
|
p.event.Emit(event.SESSION_READY, s.Id, false)
|
||||||
i, err := p.InstanceNew(s, types.InstanceConfig{ImageName: s.ImageName, PlaygroundFQDN: s.Host, DindVolumeSize: "5G"})
|
i, err := p.InstanceNew(s, types.InstanceConfig{ImageName: s.ImageName, PlaygroundFQDN: s.Host, DindVolumeSize: "5G", Privileged: true})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Printf("Error creating instance for stack [%s]: %s\n", s.Stack, err)
|
log.Printf("Error creating instance for stack [%s]: %s\n", s.Stack, err)
|
||||||
return err
|
return err
|
||||||
@@ -270,6 +271,7 @@ func (p *pwd) SessionSetup(session *types.Session, sconf SessionSetupConf) error
|
|||||||
Type: conf.Type,
|
Type: conf.Type,
|
||||||
Tls: conf.Tls,
|
Tls: conf.Tls,
|
||||||
DindVolumeSize: sconf.DindVolumeSize,
|
DindVolumeSize: sconf.DindVolumeSize,
|
||||||
|
Privileged: sconf.Privileged,
|
||||||
}
|
}
|
||||||
i, err := p.InstanceNew(session, instanceConf)
|
i, err := p.InstanceNew(session, instanceConf)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user