This commit is contained in:
parent
e304781ba3
commit
f7f7e5ffde
@ -14,6 +14,7 @@ type Config = struct {
|
|||||||
DryRun bool `default:"false" env:"WOODPECKER_AUTOSCALER_DRY_RUN"`
|
DryRun bool `default:"false" env:"WOODPECKER_AUTOSCALER_DRY_RUN"`
|
||||||
WoodpeckerLabelSelector string `default:"uploadfilter24.eu/instance-role=Woodpecker" env:"WOODPECKER_AUTOSCALER_WOODPECKER_LABEL_SELECTOR"`
|
WoodpeckerLabelSelector string `default:"uploadfilter24.eu/instance-role=Woodpecker" env:"WOODPECKER_AUTOSCALER_WOODPECKER_LABEL_SELECTOR"`
|
||||||
WoodpeckerInstance string `default:"" env:"WOODPECKER_AUTOSCALER_WOODPECKER_INSTANCE"`
|
WoodpeckerInstance string `default:"" env:"WOODPECKER_AUTOSCALER_WOODPECKER_INSTANCE"`
|
||||||
|
WoodpeckerGrpc string `default:"" env:"WOODPECKER_AUTOSCALER_WOODPECKER_GRPC"`
|
||||||
WoodpeckerAgentSecret string `default:"" env:"WOODPECKER_AUTOSCALER_WOODPECKER_AGENT_SECRET"`
|
WoodpeckerAgentSecret string `default:"" env:"WOODPECKER_AUTOSCALER_WOODPECKER_AGENT_SECRET"`
|
||||||
WoodpeckerApiToken string `default:"" env:"WOODPECKER_AUTOSCALER_WOODPECKER_API_TOKEN"`
|
WoodpeckerApiToken string `default:"" env:"WOODPECKER_AUTOSCALER_WOODPECKER_API_TOKEN"`
|
||||||
HcloudToken string `default:"" env:"WOODPECKER_AUTOSCALER_HCLOUD_TOKEN"`
|
HcloudToken string `default:"" env:"WOODPECKER_AUTOSCALER_HCLOUD_TOKEN"`
|
||||||
|
@ -30,7 +30,7 @@ write_files:
|
|||||||
- /var/run/docker.sock:/var/run/docker.sock
|
- /var/run/docker.sock:/var/run/docker.sock
|
||||||
environment:
|
environment:
|
||||||
{{- range $key, $val := .EnvConfig }}
|
{{- range $key, $val := .EnvConfig }}
|
||||||
- {{ $key }}: {{ $val }}
|
- {{ $key }}="{{ $val }}"
|
||||||
{{- end }}
|
{{- end }}
|
||||||
path: /root/docker-compose.yml
|
path: /root/docker-compose.yml
|
||||||
runcmd:
|
runcmd:
|
||||||
@ -44,7 +44,8 @@ type UserDataConfig struct {
|
|||||||
|
|
||||||
func generateConfig(cfg *config.Config, name string) (string, error) {
|
func generateConfig(cfg *config.Config, name string) (string, error) {
|
||||||
envConfig := map[string]string{}
|
envConfig := map[string]string{}
|
||||||
envConfig["WOODPECKER_SERVER"] = cfg.WoodpeckerInstance
|
envConfig["WOODPECKER_SERVER"] = cfg.WoodpeckerGrpc
|
||||||
|
envConfig["WOODPECKER_GRPC_SECURE"] = "true" // TODO: should probably made configurable
|
||||||
envConfig["WOODPECKER_AGENT_SECRET"] = cfg.WoodpeckerAgentSecret
|
envConfig["WOODPECKER_AGENT_SECRET"] = cfg.WoodpeckerAgentSecret
|
||||||
envConfig["WOODPECKER_FILTER_LABELS"] = cfg.WoodpeckerLabelSelector
|
envConfig["WOODPECKER_FILTER_LABELS"] = cfg.WoodpeckerLabelSelector
|
||||||
envConfig["WOODPECKER_HOSTNAME"] = name
|
envConfig["WOODPECKER_HOSTNAME"] = name
|
||||||
|
Loading…
Reference in New Issue
Block a user