Skip to content

feat: add custom TLS support for vLLM render endpoint - #2664

Open
zdtsw wants to merge 1 commit into
llm-d:mainfrom
zdtsw:chore_tls_tokenizer
Open

feat: add custom TLS support for vLLM render endpoint#2664
zdtsw wants to merge 1 commit into
llm-d:mainfrom
zdtsw:chore_tls_tokenizer

Conversation

@zdtsw

@zdtsw zdtsw commented Sep 2, 2026

Copy link
Copy Markdown
Member

What type of PR is this?
/kind feature

What this PR does / why we need it:
Allows the token-producer plugin to connect to render endpoints over HTTPS using a custom CA bundle or mTLS client certificates for clusters with private PKI.

Release note (write NONE if no user-facing change):

The token-producer plugin now supports HTTPS for the vLLM render endpoint. Configure `vllm.caCertPath` for custom CA verification, `vllm.clientCertPath`/`vllm.clientKeyPath` for mTLS, or `vllm.insecureSkipVerify` to skip server certificate verification.

Allows the token-producer plugin to connect to render endpoints over
HTTPS using a custom CA bundle or mTLS client certificates for
clusters with private PKI.

Signed-off-by: Wen Zhou <wenzhou@redhat.com>
Copilot AI lite review requested due to automatic review settings September 2, 2026 16:23
@zdtsw
zdtsw requested review from a team, liu-cong, sagearc and vMaroon as code owners September 2, 2026 16:23
@github-actions github-actions Bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. kind/feature Categorizes issue or PR as related to a new feature. labels Sep 2, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

TLS options are currently validated/applied without checking the URL scheme and client cert/key pairing is not explicitly validated, which can violate the documented contract and yield confusing failures.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Adds TLS configuration support to the vLLM HTTP render tokenizer backend so the token-producer plugin can call render endpoints over HTTPS using a custom CA bundle and/or mTLS client certificates.

Changes:

  • Extend vllmConfig with TLS settings (caCertPath, clientCertPath/clientKeyPath, insecureSkipVerify) and wire them into the HTTP transport.
  • Add unit tests covering basic HTTPS + custom CA + mTLS paths and a couple of error cases.
  • Update tokenizer plugin documentation to describe HTTPS/TLS configuration and deployment examples.
File summaries
File Description
pkg/epp/framework/plugins/requestcontrol/dataproducer/tokenizer/vllm_http.go Adds TLS-related config fields and builds a TLS-enabled http.Transport for render calls.
pkg/epp/framework/plugins/requestcontrol/dataproducer/tokenizer/vllm_http_test.go Adds TLS-focused tests for insecure skip verify, custom CA, and mTLS.
pkg/epp/framework/plugins/requestcontrol/dataproducer/tokenizer/README.md Documents HTTPS/TLS options and provides example configuration for TLS-enabled render services.
Review details
  • Files reviewed: 3/3 changed files
  • Comments generated: 3
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +111 to +114
transport, err := newRenderTransport(cfg)
if err != nil {
return nil, err
}
Comment on lines +173 to +179
if cfg.ClientCertPath != "" || cfg.ClientKeyPath != "" {
cert, err := tls.LoadX509KeyPair(cfg.ClientCertPath, cfg.ClientKeyPath)
if err != nil {
return nil, fmt.Errorf("loading render client cert: %w", err)
}
tc.Certificates = []tls.Certificate{cert}
}
Comment on lines +446 to +450
func TestVLLMHTTPRenderer_TLSInsecureSkipVerify(t *testing.T) {
srv := httptest.NewTLSServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) {
_ = json.NewEncoder(w).Encode([]renderResponse{{TokenIDs: []uint32{1, 2}}})
}))
defer srv.Close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/epp area/scheduling kind/feature Categorizes issue or PR as related to a new feature. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants