Pole Sidecar data plane
Run Pole Sidecar for local HTTP/gRPC routing while consuming control-plane active views.
Pole Sidecar fits multi-language services or teams that want governance in a local proxy. Forwarding is local; discovery and policy facts still come from Lattice Hub.
When to choose Sidecar
| Choose Sidecar | Choose SDK |
|---|---|
| Multi-language / hard to change code | Rust apps can embed directly |
| Need a unified local forward/intercept point | Prefer proxyless, one fewer hop |
| Pair with Controller injection | Mature SDK governance path already exists |
Quick start
cargo build
RUST_LOG=info cargo run
SIDECAR_CONFIG=./sidecar.toml RUST_LOG=debug cargo runRequires Rust 1.74+. Match grpc_prefix before prefix. Sample LB is round-robin. Full sample TOML is in the Chinese practice page / pole-sidecar/sidecar.toml (inbound 8080, /api/ → backend_http, gRPC Greeter → backend_grpc).
Community demo
| Entry | What it does |
|---|---|
| Local sample | pole-sidecar/sidecar.toml + RUST_LOG=info cargo run |
| Design docs | pole-sidecar/docs/design/ |
| K8s inject | pole-controller `sidecarInject.mode=dns |
| SDK contrast | pole-client-rust/examples/{discover,config}.rs |
cd pole-sidecar
cargo build
# start a local upstream on 127.0.0.1:9000, then:
RUST_LOG=info cargo runHow to verify
curl -sS -D - http://127.0.0.1:8080/api/hello
# expect forward to cluster backend_http endpoints per [[routes]] prefix=/api/Also verify gRPC via grpc_prefix + content-type: application/grpc, and on Kubernetes check injected sidecar containers, readiness, and outbound targets. When pairing with governance, publish active route/rate-limit releases first, then observe proxy behavior—separate “rule not published” from “proxy not consuming”.
Expected effects
| Scenario | Effect |
|---|---|
HTTP prefix=/api/ match | Forward to backend_http (round-robin) |
gRPC grpc_prefix match | Forward to backend_grpc |
| No route match | Local reject / no forward (per Sidecar version) |
| dns inject | Discovery via DNS interception |
| mesh inject | Traffic hijack; deeper intercept hooks |
| Local TOML only | Local routing may change; TOML is not cluster governance truth |
Collaboration rules
- Control plane owns active service/config/governance views.
- Sidecar consumes those views; local TOML is not the long-term source of truth.
- Interceptor hooks should evaluate active configuration.
- Pair with Controller
dns/meshinjection on Kubernetes.
Checklist
- Cluster endpoints in Sidecar config are correct
- Route prefixes do not collide; gRPC paths are complete
- Control-plane active rules are published
- Upstream reachability and timeouts are acceptable
- Debug logging can be raised for triage
- Sidecar is not described as a control-plane replacement