feat: add custom TLS support for vLLM render endpoint - #2664
Open
zdtsw wants to merge 1 commit into
Open
Conversation
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>
zdtsw
requested review from
a team,
liu-cong,
sagearc and
vMaroon
as code owners
September 2, 2026 16:23
Contributor
There was a problem hiding this comment.
🟡 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
vllmConfigwith 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() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What type of PR is this?
/kind feature
What this PR does / why we need it:
Allows the
token-producerplugin to connect to render endpoints over HTTPS using a custom CA bundle or mTLS client certificates for clusters with private PKI.Release note (write
NONEif no user-facing change):