Conversation
Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
**Commit Message** The CLI's standalone mode needs to use Envoy Gateway's latest patch [1] that allows us to use it inside our CLI. This upgrades the EG dependency version to the latest. It is not compatible with the latest cel-go, so this also pins it to 0.22 until the upstream k8s.io/apiserver dependency [2] issue is resolved. This commit is separated from the standalone implementation commit as the upgrade results in a CRD generation which is not relevant to the change. 1: envoyproxy/gateway#5407 2: https://github.com/kubernetes/apiserver/issues/116 **Related Issues/PRs (if applicable)** This is a preparation for #458 Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
|
a couple of things not working with EG standalone mode, so I might want to switch to the raw Envoy with func-e |
|
finally working |
**Commit Message** This makes changes to Main function of the extproc so that it will accept context as well as args, etc to allow the callsite to fine tune the behavior of extproc. **Related Issues/PRs (if applicable)** Extracted from #458 Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
|
@aabchoo could you take a quick look again? now it's working end-to-end. As I noted in the description, i will do the followup on the additional flags (like the one you suggested to show default configuration etc) + documentation. This is really exciting stuff |
|
i think i will add the code including the showcase one since i have some time until aaron can review;) @aabchoo forgive me to make this PR a bit giant beyond i normally feel comfortable with asking for review 😄 |
Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
|
|
||
| for i := range extensionPolicies.Items { | ||
| ep := &extensionPolicies.Items[i] | ||
| if len(ep.OwnerReferences) != 1 || ep.OwnerReferences[0].Kind != "AIGatewayRoute" || ep.OwnerReferences[0].APIVersion != "aigateway.envoyproxy.io/v1alpha1" { |
There was a problem hiding this comment.
Is it possible for ep.OwnerReferences size is 0?
There was a problem hiding this comment.
that's a bug in the controller or user created extension policies. That's why it's skipped one line below
| if len(extProc.BackendRefs) != 1 { | ||
| panic(fmt.Sprintf("BUG: unexpected number of backend refs: %d", len(extProc.BackendRefs))) | ||
| } | ||
| backendRef := &extProc.BackendRefs[0] |
There was a problem hiding this comment.
why do we only support one backendref?
There was a problem hiding this comment.
this is the extproc's backend ref so it's always exactly one backend ref. This is not user defined backend ref.
| mustWriteObj(&backend.TypeMeta, backend, runCtx.envoyGatewayResourcesOut) | ||
| backendRef.Group = ptr.To[gwapiv1.Group]("gateway.envoyproxy.io") | ||
| backendRef.Kind = ptr.To[gwapiv1.Kind]("Backend") | ||
| backendRef.Port = nil |
There was a problem hiding this comment.
BackendReference's Port is only for the case where the target is k8s Service, which is not the case here (BackendRef's API doc):
Port is required when the referent is a Kubernetes Service.
Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
|
@aabchoo thanks for the look!! |
Commit Message
This implements the
aigw runcommand that runs the AI Gateway locally. This utilizes the Envoy Gateway's standalone mode [1]. With this command, users are now able to use the AI Gateway, without Docker or Kubernetes. The follow up PRs to further modify the default configuration to add more de-facto services such as ollama, and will add the command to show the default configuration.1: https://gateway.envoyproxy.io/docs/tasks/operations/standalone-deployment-mode/
Related Issues/PRs (if applicable)
Contributes to #412
Follow up on #498