Skip to content

Commit

Permalink
clean up examples, limit scope to extensionRefs
Browse files Browse the repository at this point in the history
  • Loading branch information
npolshakova committed Feb 13, 2025
1 parent a8b9b3e commit a2a8272
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 23 deletions.
30 changes: 7 additions & 23 deletions design/10494.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ A request going through the kgateway will follow the flow below:

![ai gateway request flow](resources/ai_request_flow.png "ai gateway request flow")

Note: For the first implementation, a RoutePolicy must apply to a specific route on the HTTPRoute
via an `extensionRef`. This simplifies the assertion that the route the policy is being applied to has a
valid AI Upstream instead of allowing users to apply the policy via a `targetRef` all routes on the HTTPRoute.

### APIs

Expand Down Expand Up @@ -162,16 +165,16 @@ spec:
namespace: kgateway-system
group: kgateway.io
kind: Upstream
extensionRefs:
- group: gateway.networking.k8s.io
kind: HTTPRoute
name: openai
---
kind: RoutePolicy
metadata:
name: open-ai-opt
namespace: kgateway-system
spec:
targetRefs:
- group: gateway.networking.k8s.io
kind: HTTPRoute
name: openai
ai:
promptEnrichment:
prepend:
Expand Down Expand Up @@ -212,11 +215,6 @@ metadata:
name: openai-opt
namespace: gloo-system
spec:
targetRefs:
- group: gateway.networking.k8s.io
kind: HTTPRoute
name: openai
options:
ai:
promptEnrichment:
prepend:
Expand Down Expand Up @@ -246,11 +244,6 @@ metadata:
name: azure-openai-opt
namespace: ai-test
spec:
targetRefs:
- group: gateway.networking.k8s.io
kind: HTTPRoute
name: azure-openai
options:
ai:
promptGuard:
request:
Expand Down Expand Up @@ -285,11 +278,6 @@ metadata:
name: azure-openai-opt
namespace: ai-test
spec:
targetRefs:
- group: gateway.networking.k8s.io
kind: HTTPRoute
name: azure-openai
options:
ai:
promptGuard:
request:
Expand All @@ -310,10 +298,6 @@ metadata:
name: azure-openai-opt
namespace: ai-test
spec:
targetRefs:
- group: gateway.networking.k8s.io
kind: HTTPRoute
name: azure-openai
options:
ai:
promptGuard:
Expand Down
Binary file modified design/resources/ai_request_flow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit a2a8272

Please sign in to comment.