Add DigitalOcean autoscaler support#580
Open
RJW34 wants to merge 2 commits into
Open
Conversation
Implements the DigitalOcean cloud provider adapter using the official godo SDK. Follows the same patterns as the existing Hetzner Cloud and Vultr providers. Features: - Droplet creation with configurable region, size, image, SSH keys - IPv6 and VPC UUID support - Tag-based pool filtering for agent listing - Paginated droplet listing for RemoveAgent and ListDeployedAgentNames Closes woodpecker-ci#103
Author
|
Hi maintainers — just checking in on this PR. Happy to address any feedback or make adjustments if needed. The implementation follows the existing provider patterns (Hetzner, Vultr, Linode) and includes full test coverage. Let me know if there's anything I can do to help move this forward. Thanks! |
Member
|
please resolve conflicts PS: sorry the autoscaler hat not the most focus the past months as woodpecker itselfe got quite some improvements :) |
This was referenced Apr 24, 2026
6543
reviewed
Apr 30, 2026
| Category: category, | ||
| }, | ||
| // TODO: Deprecated remove in v2.0 | ||
| &cli.StringFlag{ |
Member
There was a problem hiding this comment.
we dont add deprecations we remove them...
6543
reviewed
Apr 30, 2026
| droplets DropletsService | ||
| } | ||
|
|
||
| func New(_ context.Context, c *cli.Command, cfg *config.Config) (engine.Provider, error) { |
Member
There was a problem hiding this comment.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds DigitalOcean as a cloud provider for the woodpecker-ci autoscaler, using the official godo SDK.
Closes #103
What's implemented
providers/digitalocean/provider.go—Providerstruct implementingengine.ProviderDeployAgent— creates droplets with configurable region, size, image, SSH keys, tags, IPv6, VPCRemoveAgent— finds droplet by name via paginated list, then deletesListDeployedAgentNames— lists droplets filtered by pool tag, with pagination supportproviders/digitalocean/flags.go— CLI flags following the same pattern as other providersdigitalocean-api-token,digitalocean-region,digitalocean-size,digitalocean-imagedigitalocean-ssh-keys,digitalocean-tags,digitalocean-ipv6,digitalocean-vpc-uuiddigitalocean-user-data(matching the deprecation pattern in other providers)providers/digitalocean/provider_test.go— 12 unit tests with interface-based mockingcmd/woodpecker-autoscaler/main.go— wireddigitaloceancase insetupProvider()+ flagsREADME.md— marked DigitalOcean as implementedDesign decisions
DropletsServiceinterface for testability (same pattern as hetznercloud'shcapi.Client)RemoveAgentuses paginatedList+ name matching since godo'sDroplets.GetByNameis not in the standard interfaceengine.RenderUserDataTemplatepatternTest plan
go test ./providers/digitalocean/...— 12/12 passgo test ./...— all existing tests still passgofmt— cleango vet— cleango mod tidy— clean