Conversation
Two Envoy sidecars and an echo application, configured over xDS by a control plane running in the test JVM.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (11)
Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughAdds a Gradle Envoy example with an xDS control plane, two Envoy sidecars, a server container, bootstrap and xDS resources, and JUnit tests for routing, authorization, retries, and timeouts. ChangesEnvoy example
Priority: ⬇️ Low Estimated code review effort: 4 (Complex) | ~45 minutes Change: Feature Sequence Diagram(s)sequenceDiagram
participant EnvoyContainerTest
participant clientSidecar
participant serverSidecar
participant serverApp
EnvoyContainerTest->>clientSidecar: Send request to outbound port
clientSidecar->>serverSidecar: Route request and add x-service-caller
serverSidecar->>serverApp: Forward authorized request
serverApp-->>EnvoyContainerTest: Return response
Suggested reviewers: Merge Risk: ⚪ Minimal · up to The new Envoy example’s declared dependencies and sidecar configuration are consistent with its test topology, with no remaining actionable merge risk identified. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 9.52% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 21 functions across 2 files. (9 skipped: 9 unsupported.)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Follow up on #8772, where a mesh style Envoy example was suggested.
Envoy behaviour comes almost entirely from configuration that a control plane delivers, which makes it awkward to try out locally. This example brings both parts up in a test:
The client sidecar adds a caller header, retries 5xx twice and applies a 1s timeout. The server sidecar authorizes the caller with the RBAC filter. Both boot with a bootstrap file that only points at the control plane, which runs in the test JVM on
envoyproxy/java-control-planeand is reached throughTestcontainers.exposeHostPorts. Listener and cluster configuration lives in JSON resources undersrc/test/resources/xds.The four tests demonstrate the setup rather than test Envoy itself: a request travelling through both sidecars, a policy update pushed to a running sidecar, retries, and a timeout. The echo application can be told to fail or to respond slowly with a request header, so no extra fault injection configuration is needed.
Note that the caller identity is a plain header, not a substitute for mutual TLS, and that only the sidecar case is covered, not Envoy at the edge.
Summary by CodeRabbit