Skip to content

Conversation

zhogu
Copy link

@zhogu zhogu commented Sep 5, 2025

Add a new service "model-proxy" to support to redirect request to all available model serving jobs in cluster

This pull request introduces the initial implementation of the model-proxy service, including its deployment configuration, core source code, and supporting scripts. The changes lay the foundation for running a model proxy as a Kubernetes DaemonSet, handling authentication, load balancing, and configuration management.

Core service implementation:

  • Added initial Go source files for the model-proxy service, including the main entry point (main.go), authentication handler (authenticator.go), and load balancer (load_balancer.go). These files provide the basic proxy functionality, request authentication, and endpoint selection logic. [1] [2] [3]
  • Included example configuration files (config.json.example, model-proxy.yaml) and Go module definition (go.mod) to support service setup and local development. [1] [2] [3]

Deployment and orchestration:

  • Added Kubernetes deployment templates (model-proxy.yaml.template, service.yaml) and Dockerfile for building the service container. These files enable the model-proxy to be deployed as a DaemonSet and managed within a cluster. [1] [2] [3]
  • Provided deployment management scripts (start.sh, stop.sh, refresh.sh, delete.sh) to automate service lifecycle operations such as startup, shutdown, refresh, and cleanup. [1] [2] [3] [4]

Configuration and validation:

  • Added Python configuration validation logic in model_proxy.py to merge service configs and ensure correct types for critical parameters (e.g., port).

Development tooling:

  • Created a .gitignore file to exclude build artifacts, logs, and virtual environments from source control.

add LTP scripts

update

update
@zhogu zhogu changed the base branch from main to dev September 5, 2025 11:33
@zhogu zhogu requested a review from Copilot September 8, 2025 02:11
Copilot

This comment was marked as outdated.

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces a new model-proxy service to redirect requests to available model serving jobs in a Kubernetes cluster. The service acts as a reverse proxy with authentication, load balancing, and request tracing capabilities.

Key Changes

  • Added a comprehensive Go-based model-proxy service with authentication, load balancing, and request tracing
  • Integrated the model-proxy service into the existing pylon reverse proxy configuration
  • Provided complete deployment infrastructure including Kubernetes manifests, Docker builds, and management scripts

Reviewed Changes

Copilot reviewed 23 out of 23 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
src/pylon/deploy/pylon.yaml.template Adds environment variable for MODEL_PROXY_URI
src/pylon/deploy/pylon-config/location.conf.template Adds nginx location block for model-proxy routing
src/model-proxy/src/types/*.go Defines core data structures for requests, responses, configs, and tracing
src/model-proxy/src/trace/trace.go Implements JSON file-based request/response logging
src/model-proxy/src/proxy/*.go Core proxy functionality including authentication, load balancing, and model server discovery
src/model-proxy/src/main.go Main entry point with command-line configuration
src/model-proxy/deploy/* Kubernetes deployment templates and management scripts
src/model-proxy/config/* Service configuration files and validation logic
src/model-proxy/build/model-proxy.common.dockerfile Docker build configuration

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link

@yukirora yukirora left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add description, args, return for each function

@zhogu zhogu requested a review from yukirora September 11, 2025 11:14
@yukirora yukirora merged commit fd9fee2 into dev Sep 15, 2025
1 check passed
This was referenced Sep 15, 2025
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.

4 participants