Add independent environment reload

in the case that the prewarming pool is depleting (see PrewarmingPoolThreshold) and is still depleting after a timeout (PrewarmingPoolReloadTimeout).
This commit is contained in:
Maximilian Paß
2023-11-03 15:31:26 +01:00
committed by Sebastian Serth
parent c46a09eeae
commit 543939e5cb
10 changed files with 295 additions and 80 deletions

View File

@ -29,9 +29,12 @@ var (
CertFile: "",
KeyFile: "",
},
InteractiveStderr: true,
TemplateJobFile: "",
PrewarmingPoolAlertThreshold: 0,
InteractiveStderr: true,
TemplateJobFile: "",
Alert: alert{
PrewarmingPoolThreshold: 0,
PrewarmingPoolReloadTimeout: 0,
},
},
Nomad: Nomad{
Enabled: true,
@ -80,15 +83,20 @@ var (
ErrConfigInitialized = errors.New("configuration is already initialized")
)
type alert struct {
PrewarmingPoolThreshold float64
PrewarmingPoolReloadTimeout uint
}
// server configures the Poseidon webserver.
type server struct {
Address string
Port int
Token string
TLS TLS
InteractiveStderr bool
TemplateJobFile string
PrewarmingPoolAlertThreshold float64
Address string
Port int
Token string
TLS TLS
InteractiveStderr bool
TemplateJobFile string
Alert alert
}
// URL returns the URL of the Poseidon webserver.