telepresenceio / telepresence

Local development against a remote Kubernetes or OpenShift cluster
https://www.telepresence.io
Other
6.51k stars 513 forks source link

Intercept sidecar calls #2215

Closed alan994 closed 2 weeks ago

alan994 commented 2 years ago

Describe the bug I'm trying to connect telepresence with my app service running in the k8s pod. In the same pod, I have a sidecar (Dapr) that is communicating with my app on localhost. When I run telepresence intercept and call Dapr from my service running locally communication works because I ran kubectl port-forward dapr-service. So my local machine is seeing Dapr at localhost. But, when Dapr needs to call my application it calls it on localhost as well. It calls remote service, not my local service. I completely understand that telepresence intercept listens only for traffic going through the Kubernetes service that is pointing to my app container and it also requires a specific header (for the personal intercept), but I was hoping there is some way to make it work.

I already asked the Dapr community is there any config I can set so Dapr could call my service by Kubernetes service, not by localhost, but there is not.

image

To Reproduce Steps to reproduce the behavior:

  1. Create sample service and Dapr sidecar
  2. Connect Telepresence to your service
  3. Push some message to queue so Dapr will need to call your application
  4. You will not get this call redirected to your local service, instead, Dapr will call remote service

Expected behavior Call my local service

Versions (please complete the following information): Client: v2.4.5 (API v3) Root Daemon: not running User Daemon: not running

Windows 10 Azure Kubernetes Service

olitomlinson commented 2 years ago

I would love to see telepresence support dapr sidecars fully too.

github-actions[bot] commented 3 weeks ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment, or this will be closed in 7 days.

thallgren commented 2 weeks ago

Please try using --replace when intercepting. That should give the desired effect.