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"`
|
||||
WoodpeckerLabelSelector string `default:"uploadfilter24.eu/instance-role=Woodpecker" env:"WOODPECKER_AUTOSCALER_WOODPECKER_LABEL_SELECTOR"`
|
||||
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"`
|
||||
WoodpeckerApiToken string `default:"" env:"WOODPECKER_AUTOSCALER_WOODPECKER_API_TOKEN"`
|
||||
HcloudToken string `default:"" env:"WOODPECKER_AUTOSCALER_HCLOUD_TOKEN"`
|
||||
|
@ -30,7 +30,7 @@ write_files:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
environment:
|
||||
{{- range $key, $val := .EnvConfig }}
|
||||
- {{ $key }}: {{ $val }}
|
||||
- {{ $key }}="{{ $val }}"
|
||||
{{- end }}
|
||||
path: /root/docker-compose.yml
|
||||
runcmd:
|
||||
@ -44,7 +44,8 @@ type UserDataConfig struct {
|
||||
|
||||
func generateConfig(cfg *config.Config, name string) (string, error) {
|
||||
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_FILTER_LABELS"] = cfg.WoodpeckerLabelSelector
|
||||
envConfig["WOODPECKER_HOSTNAME"] = name
|
||||
|
Loading…
Reference in New Issue
Block a user