Add support for separate endpointUrlMain and endpointUrlSandbox metadata keys for deployment endpoint overrides
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 71
- Forks
- 111
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 110
Description
Description
Currently, the platform API accepts three metadata keys when creating/overriding a deployment:
endpointUrl- Overrides the upstream endpoint URLvhostMain- Overrides the virtual host for the main environmentvhostSandbox- Overrides the virtual host for the sandbox environment
Since an API can have both a main and a sandbox upstream endpoint, it should be possible to override them independently at deployment time, just as vhosts can be overridden independently.
Proposed change
Introduce two new metadata keys alongside the existing one
endpointUrlMain— overridesUpstream.Main.URLendpointUrlSandbox— overridesUpstream.Sandbox.URL
The existing endpointUrl key should either be kept as an alias for endpointUrlMain (for backwards compatibility) or deprecated.
Affected areas:
- constants/constants.go — add MetadataKeyEndpointUrlMain, MetadataKeyEndpointUrlSandbox
- service/deployment.go — read and apply both new keys; extend applyEndpointOverride (or split it) to handle sandbox URL
- dto/upstream.go / gateway YAML structs — verify sandbox upstream URL field is writable through the same path
- No Gateway side changes needed
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in constants/constants.go and service/deployment.go, then trace dto/upstream.go and the gateway YAML structs to verify how upstream URLs are written. Done means endpointUrlMain and endpointUrlSandbox independently override the main and sandbox URLs, while endpointUrl remains an alias or is deprecated; no Gateway changes are needed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100