Skip to content

feat: support EU site#31

Merged
Moran-k merged 5 commits intomainfrom
feat/support-eu-site
Jan 25, 2026
Merged

feat: support EU site#31
Moran-k merged 5 commits intomainfrom
feat/support-eu-site

Conversation

@Moran-k
Copy link
Contributor

@Moran-k Moran-k commented Jan 21, 2026

Add Multi-Region Support for EU Komodor Site

Summary

Adds support for the EU Komodor site while maintaining the US site as default. Users can now specify their region via a new --region flag.

Changes

Core Implementation

  • pkg/portforward/ws.go: Added ResolveWebSocketURL() function with priority-based URL resolution
  • pkg/portforward/ctl.go: Added Region field to Controller and threaded through calls
  • pkg/portforward/cmd.go: Added --region CLI flag with validation and examples

Testing

  • pkg/portforward/ws_test.go (new): Tests for URL resolution logic
    • Region aliases (us, eu) with case-insensitivity
    • Custom WebSocket URLs
    • Environment variable precedence
    • All 12 test cases passing

Documentation

  • README.md: Updated with region usage examples and configuration details

Usage

# Default (US region)
komocli port-forward pod/mypod 5000 --namespace default --cluster my-cluster --token=...

# EU region
komocli port-forward pod/mypod 5000 --namespace default --cluster my-cluster --token=... --region eu

@Moran-k Moran-k requested review from a team and undera January 21, 2026 12:55
@Moran-k Moran-k merged commit 28fd205 into main Jan 25, 2026
2 checks passed
@Moran-k Moran-k deleted the feat/support-eu-site branch January 25, 2026 07:41
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

Comments