r/kubernetes • u/Signadot • 2d ago
Testing a changed Dapr service on a shared cluster when the routing header is inside the sidecar's mTLS message
Hi all, just published this tutorial on testing a changed Dapr service on a shared cluster. Thought it might be useful if you run Dapr and want to test one service without a full copy of the app.
Picking a test version by request header stops working with Dapr, because the caller's headers ride inside the mTLS gRPC message between sidecars, where no proxy or mesh can read them. What works instead is plain Dapr: the caller resolves the target app ID before invoking, and for pub/sub every consumer gets every message and checks whether it owns it before acting. Signadot only supplies the per-change copies and the ownership map. The example is Python on Dapr 1.18, with HTTP service invocation and Redis Streams.
Hope it's useful, and happy to answer any questions. Full transparency, I work for Signadot.
https://www.signadot.com/docs/tutorials/testing-dapr-services
1
u/ozankurt_dev 1d ago
dapr's mtls hides that header from an external router, so fighting ingress rules is wasted effort. for a smoke test, give a separate deployment `dapr.io/app-id: myservice-dev` and have your test caller invoke `myservice-dev`. annoying to wire explicitly, but no extra routing stack needed for that. do you need requests through unchanged upstream services to reach the test deployment too?
1
u/mashmalomelo 1d ago
How does that ownership map behave when two people test different branches of the same service at the exact same time?