feat: add container timeout parameter to kernel command
This commit is contained in:
parent
852680e944
commit
8c49680675
@ -104,7 +104,7 @@ func ReadOutOfTreeConf(path string) (c OutOfTree, err error) {
|
||||
}
|
||||
|
||||
if c.Docker.Timeout.Duration == 0 {
|
||||
c.Docker.Timeout.Duration = time.Minute
|
||||
c.Docker.Timeout.Duration = 8 * time.Minute
|
||||
}
|
||||
|
||||
return
|
||||
|
@ -32,6 +32,8 @@ type KernelCmd struct {
|
||||
Update bool `help:"update container"`
|
||||
Max int `help:"maximum kernels to download" default:"100500"`
|
||||
|
||||
ContainerTimeout time.Duration `help:"container timeout"`
|
||||
|
||||
List KernelListCmd `cmd:"" help:"list kernels"`
|
||||
ListRemote KernelListRemoteCmd `cmd:"" help:"list remote kernels"`
|
||||
Autogen KernelAutogenCmd `cmd:"" help:"generate kernels based on the current config"`
|
||||
@ -159,6 +161,10 @@ func (cmd *KernelCmd) Generate(g *Globals, km config.Target) (err error) {
|
||||
|
||||
container.Commands = g.Config.Docker.Commands
|
||||
container.Registry = g.Config.Docker.Registry
|
||||
container.Timeout = g.Config.Docker.Timeout.Duration
|
||||
if cmd.ContainerTimeout != 0 {
|
||||
container.Timeout = cmd.ContainerTimeout
|
||||
}
|
||||
|
||||
log.Info().Msgf("Generating for target %v", km)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user