Skip to content

fix(interceptor): clean up direct-pod routing TLS and defaults#1697

Open
Fedosin wants to merge 1 commit into
kedacore:mainfrom
Fedosin:fix/direct-pod-routing-cleanup
Open

fix(interceptor): clean up direct-pod routing TLS and defaults#1697
Fedosin wants to merge 1 commit into
kedacore:mainfrom
Fedosin:fix/direct-pod-routing-cleanup

Conversation

@Fedosin

@Fedosin Fedosin commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Follow-up to #1585: address remaining review feedback on the direct-pod routing feature.

  • Default KEDA_HTTP_DIRECT_POD_ROUTING to true (matching Knative behavior)
  • Remove dead forwardingTLSCfg/TLSClientConfig code that is superseded by DialTLSContext
  • Soften newTLSDialer to fall back to the dial-address hostname when context has no server name, instead of hard-failing
  • Fix notifyCh comment to reflect actual broadcast semantics (ready-state transitions only, not every change)
  • Document dual-stack limitation in collectServiceState

Checklist

Related to #1473

Copilot AI review requested due to automatic review settings June 24, 2026 13:00
@Fedosin Fedosin requested a review from a team as a code owner June 24, 2026 13:00
@snyk-io

snyk-io Bot commented Jun 24, 2026

Copy link
Copy Markdown

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@keda-automation keda-automation requested a review from a team June 24, 2026 13:00
@Fedosin Fedosin force-pushed the fix/direct-pod-routing-cleanup branch 2 times, most recently from 57e5eb5 to 533dbe5 Compare June 24, 2026 13:03

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.

Pull request overview

Follow-up changes to the interceptor’s direct-pod routing feature, focusing on TLS/SNI handling, default behavior, and clearer documentation around readiness broadcasts and dual-stack limitations.

Changes:

  • Default KEDA_HTTP_DIRECT_POD_ROUTING to true in interceptor serving config.
  • Simplify/adjust outbound TLS dialing by using DialTLSContext and falling back to the dial address hostname when the context lacks an upstream server name.
  • Update comments/docs in ReadyEndpointsCache to reflect ready-state transition broadcasts and document dual-stack behavior limitations.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

File Description
pkg/k8s/ready_endpoints_cache.go Clarifies notify channel broadcast semantics and documents dual-stack address-family pooling limitation.
interceptor/proxy.go Removes dead TLS forwarding config and updates TLS dialer behavior for SNI selection/fallback.
interceptor/proxy_test.go Updates the TLS dialer test to reflect fallback behavior (but needs stronger assertion coverage per stored comment).
interceptor/config/serving.go Changes direct-pod routing env default to true and adjusts related config comments.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread interceptor/proxy.go Outdated
Comment thread interceptor/proxy_test.go Outdated
Comment thread interceptor/config/serving.go
@Fedosin Fedosin force-pushed the fix/direct-pod-routing-cleanup branch 2 times, most recently from eca6f7a to 823dfa3 Compare June 29, 2026 08:01
- Default DirectPodRouting to true (matching Knative behavior)
- Remove dead forwardingTLSCfg/TLSClientConfig code superseded by
  DialTLSContext
- Soften newTLSDialer to fall back to dial-address hostname when
  context has no server name, instead of hard-failing
- Fix notifyCh comment to reflect actual broadcast semantics
  (ready-state transitions only, not every change)
- Document dual-stack limitation in collectServiceState

Signed-off-by: Mikhail Fedosin <mfedosin@redhat.com>
@Fedosin Fedosin force-pushed the fix/direct-pod-routing-cleanup branch from 823dfa3 to 2d90dbc Compare June 29, 2026 08:16
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