Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

controller: set allowModeOverride=true #158

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ require (
github.com/aws/aws-sdk-go-v2 v1.33.0
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.7
github.com/aws/aws-sdk-go-v2/config v1.29.1
github.com/envoyproxy/gateway v0.5.0-rc.1.0.20250115172926-8b89dadfbd2c
github.com/envoyproxy/gateway v0.5.0-rc.1.0.20250121222313-d0d2aa718f7e
github.com/envoyproxy/go-control-plane/envoy v1.32.3
github.com/go-logr/logr v1.4.2
github.com/google/go-cmp v0.6.0
github.com/openai/openai-go v0.1.0-alpha.46
github.com/stretchr/testify v1.10.0
golang.org/x/exp v0.0.0-20240904232852-e7e105dedf7e
google.golang.org/grpc v1.69.4
google.golang.org/protobuf v1.36.2
google.golang.org/protobuf v1.36.3
k8s.io/api v0.32.1
k8s.io/apiextensions-apiserver v0.32.1
k8s.io/apimachinery v0.32.1
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/emicklei/go-restful/v3 v3.12.1 h1:PJMDIM/ak7btuL8Ex0iYET9hxM3CI2sjZtzpL63nKAU=
github.com/emicklei/go-restful/v3 v3.12.1/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc=
github.com/envoyproxy/gateway v0.5.0-rc.1.0.20250115172926-8b89dadfbd2c h1:LsdzL2BAbgQOEAkelca7RzxPu5EP3p/Jacl0SUVBkGg=
github.com/envoyproxy/gateway v0.5.0-rc.1.0.20250115172926-8b89dadfbd2c/go.mod h1:RV0iaXk9jyAaC8U5okx0Il3Wer5B0ttXrr/PXUS86Zo=
github.com/envoyproxy/gateway v0.5.0-rc.1.0.20250121222313-d0d2aa718f7e h1:YQO3NgKOD/0Cq44IvJI0RHuO9nJma/ISVxUL54R+a9U=
github.com/envoyproxy/gateway v0.5.0-rc.1.0.20250121222313-d0d2aa718f7e/go.mod h1:KO4JwUanODBOvOigUygRz78+pmJ4QcxZrtHSwK4qStk=
Comment on lines -43 to +44
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zirain @arkodg @zhaohuabing somehow go get github.com/envoyproxy/gateway@latest or whatever untagged version results in this weird v0.5.0-rc.1....... would you be able to fix it? dependabot tries to update it to the latest tagged version (v1.2.5 for now) as this "looks" like old but it is indeed the latest main branch

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ack i can add this to ignore dependabot.yaml but weird so i figured i wanted to ask

github.com/envoyproxy/go-control-plane/envoy v1.32.3 h1:hVEaommgvzTjTd4xCaFd+kEQ2iYBtGxP6luyLrx6uOk=
github.com/envoyproxy/go-control-plane/envoy v1.32.3/go.mod h1:F6hWupPfh75TBXGKA++MCT/CZHFq5r9/uwt/kQYkZfE=
github.com/envoyproxy/protoc-gen-validate v1.1.0 h1:tntQDh69XqOCOZsDz0lVJQez/2L6Uu2PdjCQwWCJ3bM=
Expand Down Expand Up @@ -215,8 +215,8 @@ google.golang.org/genproto/googleapis/rpc v0.0.0-20241209162323-e6fa225c2576 h1:
google.golang.org/genproto/googleapis/rpc v0.0.0-20241209162323-e6fa225c2576/go.mod h1:5uTbfoYQed2U9p3KIj2/Zzm02PYhndfdmML0qC3q3FU=
google.golang.org/grpc v1.69.4 h1:MF5TftSMkd8GLw/m0KM6V8CMOCY6NZ1NQDPGFgbTt4A=
google.golang.org/grpc v1.69.4/go.mod h1:vyjdE6jLBI76dgpDojsFGNaHlxdjXN9ghpnd2o7JGZ4=
google.golang.org/protobuf v1.36.2 h1:R8FeyR1/eLmkutZOM5CWghmo5itiG9z0ktFlTVLuTmU=
google.golang.org/protobuf v1.36.2/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE=
google.golang.org/protobuf v1.36.3 h1:82DV7MYdb8anAVi3qge1wSnMDrnKK7ebr+I0hHRN1BU=
google.golang.org/protobuf v1.36.3/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
Expand Down
5 changes: 3 additions & 2 deletions internal/controller/ai_gateway_route.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,9 @@ func (c *aiGatewayRouteController) reconcileExtProcExtensionPolicy(ctx context.C
PolicyTargetReferences: egv1a1.PolicyTargetReferences{TargetRefs: aiGatewayRoute.Spec.TargetRefs},
ExtProc: []egv1a1.ExtProc{{
ProcessingMode: &egv1a1.ExtProcProcessingMode{
Request: &egv1a1.ProcessingModeOptions{Body: &pm},
Response: &egv1a1.ProcessingModeOptions{Body: &pm},
AllowModeOverride: true, // Streaming completely overrides the buffered mode.
Request: &egv1a1.ProcessingModeOptions{Body: &pm},
Response: &egv1a1.ProcessingModeOptions{Body: &pm},
},
BackendCluster: egv1a1.BackendCluster{BackendRefs: []egv1a1.BackendRef{{
BackendObjectReference: gwapiv1.BackendObjectReference{
Expand Down
5 changes: 5 additions & 0 deletions internal/controller/ai_gateway_route_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,11 @@ func TestAIGatewayRouteController_reconcileExtProcExtensionPolicy(t *testing.T)
require.Len(t, extPolicy.Spec.ExtProc, 1)
require.NotNil(t, extPolicy.Spec.ExtProc[0].Metadata)
require.NotEmpty(t, extPolicy.Spec.ExtProc[0].Metadata.WritableNamespaces)
require.Equal(t, &egv1a1.ExtProcProcessingMode{
AllowModeOverride: true,
Request: &egv1a1.ProcessingModeOptions{Body: ptr.To(egv1a1.BufferedExtProcBodyProcessingMode)},
Response: &egv1a1.ProcessingModeOptions{Body: ptr.To(egv1a1.BufferedExtProcBodyProcessingMode)},
}, extPolicy.Spec.ExtProc[0].ProcessingMode)
require.Equal(t, aigv1a1.AIGatewayFilterMetadataNamespace, extPolicy.Spec.ExtProc[0].Metadata.WritableNamespaces[0])

// Update the policy.
Expand Down
Loading