Skip to content

fix(kubernetes): stop scoping marketplace app list to the target region - #600

Merged
giornetta merged 2 commits into
masterfrom
fix/kubernetes-create-marketplace-region
Sep 8, 2026
Merged

fix(kubernetes): stop scoping marketplace app list to the target region#600
giornetta merged 2 commits into
masterfrom
fix/kubernetes-create-marketplace-region

Conversation

@alessandroargentieri

Copy link
Copy Markdown
Member

Summary

  • civo kubernetes create unconditionally calls ListDefaultApps() to build the default marketplace-app list before creating the cluster
  • civogo's sendRequest appends ?region=<client.Region> to every request; fix: remove hardcoded nyc1 region from marketplace app queries #582 removed the hardcoded nyc1 override on this call, so it now sends the cluster's real target region
  • For regions the marketplace catalogue backend doesn't know about (e.g. jkt1), /v2/kubernetes/applications 404s with database_region_not_found, aborting cluster creation entirely even though the region is valid for the cluster itself (CheckAvailability, GetDefaultNetwork, and NewKubernetesClusters all succeed with that same region)
  • Fix: explicitly clear the client's region before this specific call, since the marketplace catalogue is global and shouldn't be region-scoped at all (rather than reintroducing a hardcoded region)

Test plan

  • go build ./...
  • go test ./utility/...
  • Manual repro: civo kubernetes create <name> -s g4s.kube.xsmall -t default -n 1 --region jkt1 on a config where the marketplace backend doesn't recognize the region — confirm cluster creation no longer fails at the apps-listing step

🤖 Generated with Claude Code

alessandroargentieri and others added 2 commits September 8, 2026 11:56
ListDefaultApps/CheckAPPName call the global /v2/kubernetes/applications
catalogue, but civogo's sendRequest tacks the client's Region onto every
GET as a query param. Since #582 removed the hardcoded nyc1 override, the
call now sends the user's real --region, which 404s with
database_region_not_found for any region the marketplace backend doesn't
know about (e.g. jkt1) -- aborting `civo kubernetes create` before the
cluster is ever requested, even though the region itself is valid for
cluster creation.

Clear the region explicitly for this catalogue call instead of relying on
whatever region the client happens to be configured with.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
toolchain go1.26.6 resolves the crypto/tls, net/url, net/http/idna, and
encoding/asn1 stdlib CVEs; golang.org/x/image v0.45.0 resolves the
vp8l/webp/tiff decoding CVEs.
@giornetta
giornetta merged commit c9fda71 into master Sep 8, 2026
5 of 6 checks passed
@giornetta
giornetta deleted the fix/kubernetes-create-marketplace-region branch September 8, 2026 12:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants