Conversation
Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
|
envoyproxy/gateway#5505 is blocker for this |
|
another one: envoyproxy/gateway#5538 |
|
🤞 |
|
finally!!!!!!!!!!!!!!!!!! |
|
@aabchoo could you take a quick look? This is just a skeleton (not actually running/translationg the AI resources) and just adds the Envoy Gateway integration with an empty configuration extracted from #458. It is a bit large but the more than half is go.sum/go.mod and auto generated contents which you can ignore. |
| maximum: 4294967295 | ||
| minimum: 0 | ||
| type: integer | ||
| perEndpoint: |
There was a problem hiding this comment.
this is due to the upgrades of EG to the latest, so not directly relevant
| github.com/envoyproxy/go-control-plane/envoy v1.32.5-0.20250303232259-0c5cb90447bb | ||
| github.com/go-logr/logr v1.4.2 | ||
| github.com/google/cel-go v0.24.1 | ||
| github.com/google/cel-go v0.22.1 |
There was a problem hiding this comment.
this was needed due to https://github.com/kubernetes/apiserver/issues/116 and need to pin it to 0.22.x until it's resolved
| "github.com/stretchr/testify/require" | ||
| ) | ||
|
|
||
| func TestRun_default(t *testing.T) { |
| test-coverage: | ||
| @mkdir -p $(OUTPUT_DIR) | ||
| @$(MAKE) test GO_TEST_ARGS="-coverprofile=$(OUTPUT_DIR)/go-test-coverage.out -covermode=atomic -coverpkg=./... $(GO_TEST_ARGS)" | ||
| @$(MAKE) test GO_TEST_ARGS="-coverprofile=$(OUTPUT_DIR)/go-test-coverage.out -covermode=atomic -coverpkg=github.com/envoyproxy/ai-gateway/... $(GO_TEST_ARGS)" |
There was a problem hiding this comment.
yeah i should've left a note; envoyproxy/gateway is really a large project, hence generating the test coverage instrumented binary for it really take sa lot of time. So, simply this switches to do the instrumentation for the code in this repository (which is only thing we need in the first place for the test coverage report here).
| // cmdRun corresponds to `aigw run` command. | ||
| cmdRun struct { | ||
| Debug bool `help:"Enable debug logging emitted to stderr."` | ||
| Path string `arg:"" name:"path" optional:"" help:"Path to the AI Gateway configuration yaml file. Optional. When this is not given, aigw runs the default configuration." type:"path"` |
There was a problem hiding this comment.
Do you think it would be helpful for users to know the default config file?
There was a problem hiding this comment.
yeah that's my plan indeed. will do that in the next real implementation PR
cmd/aigw/certs/envoy/ca.crt
Outdated
| @@ -0,0 +1,19 @@ | |||
| -----BEGIN CERTIFICATE----- | |||
| MIIDGDCCAgCgAwIBAgIEFZ8l4DANBgkqhkiG9w0BAQsFADAsMRYwFAYDVQQDEw1l | |||
| bnZveS1nYXRld2F5MRIwEAYDVQQFEwkzNjI3NTE0NTYwHhcNMjUwMzA0MDAzODA4 | |||
There was a problem hiding this comment.
Sanity check: do these certs never expire?
There was a problem hiding this comment.
good catch and switched to do the cert gen on demand without checking them in. Now the code looks a bit simpler, thanks!
| // Even after the context is done, the goroutine managing the Envoy process might be still trying to shut it down. | ||
| // Give it some time to do so, otherwise the process might become an orphan. This is the limitation of the current | ||
| // API of func-e library that is used by Envoy Gateway to run the Envoy process. | ||
| // TODO: actually fix the library and the EG accordingly. |
There was a problem hiding this comment.
this will be done after envoyproxy/gateway#5527 lands
**Commit Message** This implements the `aigw run` command 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 --------- Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
Commit Message
This scaffolds
aigw run [path]command that allows users to run AI Gateway natively without k8s/docker.Related Issues/PRs (if applicable)
Extracted from #458
Contributes to #412