Files
twcloud-scaler/providers/timewebcloud/flags.go
Sergey Vanyushkin 191cdd108f feat: add Timeweb Cloud provider for Woodpecker CI autoscaler
- Implement timewebcloud provider with DeployAgent, RemoveAgent, ListDeployedAgentNames
- Add minimal HTTP API client for Timeweb Cloud (create/list/delete servers)
- Register provider in main.go with CLI flags
- Add timeweb-list and timeweb-tester utilities
- Include Dockerfile and docker-compose.yml for deployment
- Update DEPLOY.md with verified OS/preset IDs
2026-05-16 13:09:07 +03:00

48 lines
1.3 KiB
Go

package timewebcloud
import (
"github.com/urfave/cli/v3"
)
const category = "Timeweb Cloud"
var ProviderFlags = []cli.Flag{
&cli.StringFlag{
Name: "timewebcloud-api-token",
Usage: "Timeweb Cloud API JWT token",
Sources: cli.EnvVars("WOODPECKER_TIMEWEBCLOUD_API_TOKEN"),
Category: category,
},
&cli.IntFlag{
Name: "timewebcloud-os-id",
Usage: "OS image ID to use for new servers (from GetOsList)",
Sources: cli.EnvVars("WOODPECKER_TIMEWEBCLOUD_OS_ID"),
Category: category,
},
&cli.IntFlag{
Name: "timewebcloud-preset-id",
Usage: "Pricing preset ID (from GetServersPresets)",
Sources: cli.EnvVars("WOODPECKER_TIMEWEBCLOUD_PRESET_ID"),
Category: category,
},
&cli.StringFlag{
Name: "timewebcloud-availability-zone",
Usage: "Availability zone for new servers",
Sources: cli.EnvVars("WOODPECKER_TIMEWEBCLOUD_AVAILABILITY_ZONE"),
Category: category,
},
&cli.StringSliceFlag{
Name: "timewebcloud-ssh-key-ids",
Usage: "SSH key IDs to inject into new servers",
Sources: cli.EnvVars("WOODPECKER_TIMEWEBCLOUD_SSH_KEY_IDS"),
Category: category,
},
// TODO: Deprecated remove in v2.0
&cli.StringFlag{
Name: "timewebcloud-user-data",
Usage: "timeweb cloud userdata template (deprecated)",
Sources: cli.EnvVars("WOODPECKER_TIMEWEBCLOUD_USERDATA"),
Category: category,
},
}