feat: allow to configure the runner name
This commit is contained in:
parent
b2a22e1e79
commit
6af3025743
19 changed files with 571 additions and 5 deletions
|
|
@ -21,6 +21,8 @@ import (
|
|||
"garm/runner/providers/common"
|
||||
)
|
||||
|
||||
const DefaultRunnerPrefix = "garm"
|
||||
|
||||
type InstanceRequest struct {
|
||||
Name string `json:"name"`
|
||||
OSType config.OSType `json:"os_type"`
|
||||
|
|
@ -102,10 +104,18 @@ type UpdatePoolParams struct {
|
|||
RunnerBootstrapTimeout *uint `json:"runner_bootstrap_timeout,omitempty"`
|
||||
Image string `json:"image"`
|
||||
Flavor string `json:"flavor"`
|
||||
RunnerPrefix string `json:"runner_prefix"`
|
||||
OSType config.OSType `json:"os_type"`
|
||||
OSArch config.OSArch `json:"os_arch"`
|
||||
}
|
||||
|
||||
func (p *UpdatePoolParams) GetRunnerPrefix() string {
|
||||
if p.RunnerPrefix == "" {
|
||||
p.RunnerPrefix = DefaultRunnerPrefix
|
||||
}
|
||||
return p.RunnerPrefix
|
||||
}
|
||||
|
||||
type CreateInstanceParams struct {
|
||||
Name string
|
||||
OSType config.OSType
|
||||
|
|
@ -119,6 +129,7 @@ type CreateInstanceParams struct {
|
|||
|
||||
type CreatePoolParams struct {
|
||||
ProviderName string `json:"provider_name"`
|
||||
RunnerPrefix string `json:"runner_prefix"`
|
||||
MaxRunners uint `json:"max_runners"`
|
||||
MinIdleRunners uint `json:"min_idle_runners"`
|
||||
Image string `json:"image"`
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue