flyte
flyte copied to clipboard
feat: add custom port support for sandbox
Tracking issue
Closes #7346
Why are the changes needed?
Currently the sandbox uses fixed port mappings internally, so users cannot run the sandbox on custom ports when the default ones are already occupied. This makes local development difficult in environments where those ports are unavailable.
What changes were proposed in this pull request?
- Added support for custom sandbox port mappings through a new
--portsflag. - Updated sandbox configuration to accept multiple port mappings.
- Modified sandbox startup logic to use user-provided ports when supplied.
- Kept the existing default behavior unchanged when custom ports are not passed.
Example:
flytectl sandbox start --ports 8080:30081
How was this patch tested?
- Ran
go build ./... - Verified that
flytectl sandbox start --helpshows the new--portsoption. - Confirmed the sandbox startup flow compiles successfully with custom port configuration support.