feat: worked provider example; cloudprovider fixes for adoption and token cleanup #28
Loading…
Reference in a new issue
No description provided.
Delete branch "example"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Two parts, one PR so Exoscale can build on both at once.
cloudprovider fixes (vultr's review of #25):
HydrateAt(nodeClaim, instanceTypes, Placement)labels an adopted instance from its real type and zone (identity labels + the instance's capacity when the type left the catalogue);Hydrate's doc says it takes the candidate Launch returned.(T, cleanup, error); Launch runs the cleanup on a detached context for any attempt whose error wrapsErrNoInstance, so a minted join token isn't leaked across refused attempts.ErrNoInstancemarks every Refused error and the nothing-launched error.internal/example: a provider written on kit against a fake cloud, to copy from (internal so the fake can't be imported): fakecloud.go (the one file a real provider replaces with its API client), node class embedding kit/apis, catalogue Source, orphan Instances, a CloudProvider using the helpers + Launcher + Joiner + nodename + ownership + providerid + typename, and Setup/Run wiring the controllers. Tests: cheapest launch, refusal fall-through, all refused, quota, adopt on retry, Get/List/Delete, drift, GetInstanceTypes.
🤖 Generated with Claude Code