You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
chore: recast demo/local as truthful listener-sidecar smoke demo
Remove mock-upstream from default setup flow, fix broken wget-based
metrics check to use port-forward+curl, bound synthetic request timeouts,
correct stale ConfigMap comments in values.yaml, and reframe README as
listener-audit validation with explicit scope boundaries.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: demo/local/README.md
+27-22Lines changed: 27 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,20 @@
1
1
# Local Cluster Demo
2
2
3
-
This demo creates a local Kubernetes cluster with kind, installs Koshi in listener mode, deploys a mock upstream and sample workload, sends synthetic traffic, and validates structured events and metrics.
3
+
This demo creates a local kind cluster, installs Koshi in listener mode, injects a sidecar into a sample workload, sends synthetic traffic, and validates that structured events and Prometheus metrics are emitted by the listener sidecar.
4
4
5
5
> **This demo is for local development and validation only.** It requires a repo checkout, a local Docker build, and a kind cluster. To install Koshi on a real cluster using published artifacts, see [Koshi Onboarding](../../docs/onboarding.md).
6
6
7
+
## What This Demo Validates
8
+
9
+
- Sidecar injection via the mutating admission webhook
10
+
- Structured governance events (`stream: "event"`) emitted by the listener
11
+
- Prometheus metrics (`koshi_listener_*`) exposed by the sidecar
12
+
13
+
## What This Demo Does Not Validate
14
+
15
+
- Real upstream AI provider responses — the sidecar routes to `api.openai.com` by default. Upstream responses may fail due to auth or connectivity. Demo success is based on listener events and metrics, not upstream response status.
16
+
- Enforcement mode, custom policy, or standalone deployment — this demo is listener-only.
The sidecar routes to `api.openai.com` by default. Upstream responses may fail due to auth or connectivity — the listener emits structured events and metrics before upstream proxying, so failures do not affect demo validation. The setup script bounds request time (`--connect-timeout 2 --max-time 5`) for the same reason.
You should see events with `decision_shadow: "allow"` and shadow fields like `namespace`, `workload_kind`, `provider`.
88
+
You should see events with `decision_shadow` and fields like `namespace`, `workload_kind`, `provider`.
79
89
80
90
### 7. Check metrics
81
91
@@ -95,26 +105,21 @@ Expected metrics:
95
105
curl -s http://localhost:15080/status | jq .
96
106
```
97
107
98
-
## What to Look For
108
+
## Notes
99
109
100
-
-**Events with `"stream": "event"`** — these are the structured governance events
101
-
-**`decision_shadow: "allow"`** — traffic is flowing and passing all checks
102
-
-**`koshi_listener_decisions_total`** — Prometheus counter with namespace and shadow decision labels
103
-
-**No 403/429/503 responses** — listener mode never blocks traffic
110
+
`mock-upstream.yaml` is retained in this directory but is not part of the default demo flow. Injected sidecars use `DefaultListenerConfig()`, which routes to real AI provider APIs — the mock upstream is not reachable without overriding sidecar upstream routing, which is not supported for injected sidecars in the current release.
104
111
105
112
## Using Released Artifacts
106
113
107
-
The local demo above uses a locally built image and a mock upstream. To use published artifacts on a real cluster with real AI API providers:
114
+
To use published artifacts on a real cluster with real AI API providers:
Injected sidecars use the built-in default listener config, which routes traffic to `https://api.openai.com` and `https://api.anthropic.com`. The mock-upstream flow in this demo is for local development only — it is not part of the released-artifact validation path.
116
-
117
-
For partner onboarding on a real cluster, see [Koshi Onboarding](../../docs/onboarding.md).
122
+
For onboarding on a real cluster, see [Koshi Onboarding](../../docs/onboarding.md).
0 commit comments