Skip to content

feat(benchmarks): proxy external URL routing, HAProxy port alignment, and fleet filtering - #216

Open
JLCode-tech wants to merge 2 commits into
fix/agent-ws-reconnect-drainfrom
feat/benchmarks-external-url-and-fleet-filtering
Open

feat(benchmarks): proxy external URL routing, HAProxy port alignment, and fleet filtering#216
JLCode-tech wants to merge 2 commits into
fix/agent-ws-reconnect-drainfrom
feat/benchmarks-external-url-and-fleet-filtering

Conversation

@JLCode-tech

Copy link
Copy Markdown
Collaborator

Summary

This PR resolves external routability and port mapping issues when benchmarking non-BNK proxies (HAProxy and NGINX) from external benchmark agents, and introduces multi-cluster fleet filtering and cluster badging across the Benchmarks UI.

Key Changes

  1. Proxy External URL Resolution:
    • Implemented _resolve_service_external_url in ProxyDeployService to inspect Kubernetes NodePort allocations and worker node routable VPC IPs (InternalIP / ExternalIP / Hostname), storing the reachable URL in ProxyDeployment.external_url.
    • Updated trigger_benchmark_run and scenario dispatches to prioritize deploy.external_url over internal cluster DNS.
    • Added Kubernetes Layer 3 fallback check in BenchmarkTargetService.validate_target to verify backing services and running pods for internal cluster URLs.
  2. HAProxy Port Alignment:
    • Fixed _values_haproxy in ProxyDeployService to set service.ports.http and containerPorts.http to 10080 (matching haproxy.cfg bind port), eliminating connection refused errors on NodePort forwards.
  3. Multi-Cluster Fleet Filtering & Badging:
    • Added cluster_name property to BenchmarkTarget, BenchmarkRun, and BenchmarkRunGroup models and response schemas.
    • Added cluster_id query filtering and eager loading to benchmark listing APIs.
    • Integrated ClusterPicker into Benchmarks.tsx header for fleet-level aggregate or cluster-scoped views.
    • Displayed cluster column and badges in target tables, detail cards, and the run wizard.

Verification

  • All backend unit tests pass (test_proxy_deploy_resolve_url.py, test_validate_target.py, test_benchmark_cluster_info.py, test_proxy_deploy_new_proxies.py).
  • Frontend unit tests pass (BenchmarkTargetsTab.test.tsx).
  • Live cluster validation on bnk-singapore: executed Run E2E: Dev/QA — performance & validation (benchmark run & compare) #60 against HAProxy with 250/250 successful requests (100% success rate).

…d proxies and align HAProxy 10080 port mapping

- Resolve nodeport service external IP and internal IP for deployed proxies
- Set HAProxy service and container port to 10080 in helm chart values
- Prioritize deploy.external_url for benchmark dispatch
- Add Layer 3 Kubernetes pod fallback check during target validation
…ng to benchmarks UI

- Expose cluster_name on BenchmarkTarget, BenchmarkRun, and BenchmarkRunGroup
- Add cluster_id query filter and eager loading to benchmark listing APIs
- Integrate ClusterPicker fleet selector on Benchmarks page header
- Display cluster column and badges in target lists and benchmark wizards
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.

1 participant