Skip to content

Commit 37e0c58

Browse files
committed
Merge branch 'main' of ssh://github.com/envoyproxy/ai-gateway
2 parents 0f42d52 + a0e4c0e commit 37e0c58

File tree

145 files changed

+9538
-1469
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

145 files changed

+9538
-1469
lines changed

.github/codecov.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,7 @@ coverage:
1414
ignore:
1515
- "cmd"
1616
- "examples"
17-
- "**/*.pb.go"
1817
- "**/zz_generated.*.go"
19-
- "tests/internal/envtest.go"
20-
- "tests/internal/e2elib/**/*"
21-
- "tests/internal/testenvironment/**/*"
22-
- "tests/internal/testopeninference/openai_proxy.go"
23-
- "tests/internal/testmcp/**/*"
24-
- "internal/testing/**/*"
18+
- "internal/testing"
19+
- "tests/internal"
2520
- "internal/controller/controller.go"

.github/workflows/build_and_test.yaml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ jobs:
160160
TEST_AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_BEDROCK_USER_AWS_SECRET_ACCESS_KEY }}
161161
TEST_OPENAI_API_KEY: ${{ secrets.ENVOY_AI_GATEWAY_OPENAI_API_KEY }}
162162
TEST_GEMINI_API_KEY: ${{ secrets.ENVOY_AI_GATEWAY_GEMINI_API_KEY }}
163+
TEST_COHERE_API_KEY: ${{ secrets.ENVOY_AI_GATEWAY_COHERE_API_KEY }}
163164
TEST_GROQ_API_KEY: ${{ secrets.ENVOY_AI_GATEWAY_GROQ_API_KEY }}
164165
TEST_GROK_API_KEY: ${{ secrets.ENVOY_AI_GATEWAY_GROK_API_KEY }}
165166
TEST_SAMBANOVA_API_KEY: ${{ secrets.ENVOY_AI_GATEWAY_SAMBANOVA_API_KEY }}
@@ -183,6 +184,8 @@ jobs:
183184
include:
184185
- name: latest
185186
envoy_gateway_version: v0.0.0-latest
187+
- name: v1.6.0-rc.1
188+
envoy_gateway_version: v1.6.0-rc.1
186189
- name: v1.5.0
187190
envoy_gateway_version: v1.5.0
188191
steps:
@@ -207,6 +210,7 @@ jobs:
207210
TEST_OPENAI_API_KEY: ${{ secrets.ENVOY_AI_GATEWAY_OPENAI_API_KEY }}
208211
TEST_ANTHROPIC_API_KEY: ${{ secrets.ENVOY_AI_GATEWAY_ANTHROPIC_API_KEY }}
209212
TEST_GEMINI_API_KEY: ${{ secrets.ENVOY_AI_GATEWAY_GEMINI_API_KEY }}
213+
TEST_COHERE_API_KEY: ${{ secrets.ENVOY_AI_GATEWAY_COHERE_API_KEY }}
210214
run: make test-e2e
211215

212216
test_e2e_upgrade:
@@ -242,7 +246,7 @@ jobs:
242246
- run: make test-e2e-upgrade
243247
env:
244248
# We only need to test the upgrade from the latest stable version of EG.
245-
EG_VERSION: v1.5.0
249+
EG_VERSION: v1.6.0-rc.1
246250
K8S_VERSION: ${{ matrix.k8s-version }}
247251

248252
test_e2e_inference_extension:
@@ -270,6 +274,8 @@ jobs:
270274
key: e2e-test-${{ hashFiles('**/go.mod', '**/go.sum', '**/Makefile') }}
271275
- uses: docker/setup-buildx-action@v3
272276
- run: make test-e2e-inference-extension
277+
env:
278+
EG_VERSION: v1.6.0-rc.1
273279

274280
test_e2e_namespaced:
275281
needs: changes
@@ -299,7 +305,7 @@ jobs:
299305
env:
300306
# We only need to test with the latest stable version of EG, since these e2e tests
301307
# do not depend on the EG version.
302-
EG_VERSION: v1.5.0
308+
EG_VERSION: v1.6.0-rc.1
303309

304310
test_e2e_aigw:
305311
needs: changes

.testcoverage.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,10 @@ exclude:
1616
- cmd/
1717
# Generated code should not be tested.
1818
- zz_generated.deepcopy.go
19+
# Generated Kubernetes client code.
20+
- api/v1alpha1/client/
1921
# They are test-only libraries.
20-
- tests/internal/envtest.go
21-
- tests/internal/gotool.go
22-
- tests/internal/e2elib/
23-
- tests/internal/testenvironment/
24-
- tests/internal/testmcp/
25-
- tests/internal/testopeninference/openai_proxy.go
22+
- tests/internal/
2623
- internal/testing/
2724
# TODO: Remove this exclusion.
2825
- internal/controller/controller.go

Makefile

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ help:
4646
# This runs all necessary steps to prepare for a commit.
4747
.PHONY: precommit
4848
precommit: ## Run all necessary steps to prepare for a commit.
49-
precommit: tidy spellcheck apigen apidoc format lint editorconfig helm-test
49+
precommit: tidy spellcheck apigen codegen apidoc format lint editorconfig helm-test
5050

5151
.PHONY: lint
5252
lint: ## This runs the linter on the codebase.
@@ -116,6 +116,36 @@ apidoc: ## Generate API documentation for the API defined in the api directory.
116116
--output-path site/docs/api/api.mdx \
117117
--renderer=markdown
118118

119+
# This generates typed client, listers, and informers for the API.
120+
.PHONY: codegen
121+
codegen: ## Generate typed client, listers, and informers for the API.
122+
@echo "codegen => generating kubernetes clients..."
123+
@echo "codegen => generating clientset..."
124+
@$(GO_TOOL) client-gen \
125+
--clientset-name="versioned" \
126+
--input-base="" \
127+
--input="github.com/envoyproxy/ai-gateway/api/v1alpha1" \
128+
--go-header-file=/dev/null \
129+
--output-dir="./api/v1alpha1/client/clientset" \
130+
--output-pkg="github.com/envoyproxy/ai-gateway/api/v1alpha1/client/clientset" \
131+
--plural-exceptions="BackendSecurityPolicy:BackendSecurityPolicies"
132+
@echo "codegen => generating listers..."
133+
@$(GO_TOOL) lister-gen \
134+
--go-header-file=/dev/null \
135+
--output-dir="./api/v1alpha1/client/listers" \
136+
--output-pkg="github.com/envoyproxy/ai-gateway/api/v1alpha1/client/listers" \
137+
--plural-exceptions="BackendSecurityPolicy:BackendSecurityPolicies" \
138+
"github.com/envoyproxy/ai-gateway/api/v1alpha1"
139+
@echo "codegen => generating informers..."
140+
@$(GO_TOOL) informer-gen \
141+
--go-header-file=/dev/null \
142+
--versioned-clientset-package="github.com/envoyproxy/ai-gateway/api/v1alpha1/client/clientset/versioned" \
143+
--listers-package="github.com/envoyproxy/ai-gateway/api/v1alpha1/client/listers" \
144+
--output-dir="./api/v1alpha1/client/informers" \
145+
--output-pkg="github.com/envoyproxy/ai-gateway/api/v1alpha1/client/informers" \
146+
--plural-exceptions="BackendSecurityPolicy:BackendSecurityPolicies" \
147+
"github.com/envoyproxy/ai-gateway/api/v1alpha1"
148+
@echo "codegen => complete"
119149

120150
##@ Testing
121151

RELEASES.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,15 @@
22

33
## Release Cycles
44

5-
Since Envoy AI Gateway depends on the Envoy Gateway and Envoy Proxy, we will follow the release cycle of the Envoy Gateway.
6-
5+
Since Envoy AI Gateway depends on the Envoy Gateway and Envoy Proxy, we will normally follow the release cycle of the Envoy Gateway.
76
In other words, we aim to cut the release of the Envoy AI Gateway a few days or a week after the new version of the Envoy Gateway is released. Therefore, the release cycle of the Envoy AI Gateway will be approximately every 2-3 months.
87

9-
We increment the major version number when we have a major architectural change or a major feature addition.
8+
However, given the rapidly changing nature of the AI ecosystem, we aim to release frequently, as soon as features are available.
9+
The main branch of Envoy AI Gateway is tested against both the latest stable version of Envoy Gateway and its main branch, allowing us to confidently release the Envoy AI Gateway at any time if needed.
1010

11+
## Versioning
12+
13+
We increment the major version number when we have a major architectural change or a major feature addition.
1114
Especially when we have a first stable control plane API, we will cut the major v1.0.0 release. Until then, we will use the version number v0.3.x, v0.4.y, etc. See the [support policy](#Support-Policy) for more details.
1215

1316
The patch version will be incremented when we have a bug fix or a security fix. The end of life for the version will be 2 releases after the release of the version. For example, if we release the version v0.1.0, the end of life for the version will be when we release the version v0.3.0.
@@ -28,11 +31,12 @@ First of all, there are four areas of compatibility that we are concerned with:
2831

2932
### Public Go package
3033

31-
Since we do not envision this repository ends up as a transitive dependency, i.e. only used as a direct dependency such as in a custom control plane, etc., we assume that any consumer of the project should have the full control over the source code depending on the project. This allows us to declare deprecation and introduce the breaking changes in the version after the next one since they can migrate the code at their discretion. For example, any public API that is marked as deprecated in the version N will be removed in the version N+2. We document how users should migrate to the new API will be documented in the release notes if applicable, but we do not guarantee that the migration path will be provided.
34+
We do not guarantee any compatibility at Go level except for the api package as described below.
35+
Any other public Go package is solely intended for the internal use, e.g. for testing purpose.
3236

33-
### Custom Resource Definitions
37+
### Custom Resource Definitions (CRDs) / `api` package
3438

35-
The Custom Resource Definitions (CRDs) are defined in api/${version}/\*.go files. The CRDs are versioned as v1alpha1, v1alpha2, etc.
39+
The Custom Resource Definitions (CRDs) are defined in `api/${version}/*.go` files. The CRDs are versioned as v1alpha1, v1alpha2, etc.
3640

3741
**For alpha versions**, we simply employ the same deprecation policy as the Go package. In other words, the APIs will be marked as deprecated in the version N and will be removed in the version N+2 but without any guarantee of migration path.
3842

api/v1alpha1/ai_gateway_route.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ import (
2929
// Gateway to patch the generated resources. For example, you can configure the retry fallback behavior by attaching
3030
// BackendTrafficPolicy API of Envoy Gateway to the generated HTTPRoute.
3131
//
32+
// +genclient
33+
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
3234
// +kubebuilder:object:root=true
3335
// +kubebuilder:subresource:status
3436
// +kubebuilder:printcolumn:name="Status",type=string,JSONPath=`.status.conditions[-1:].type`
@@ -43,6 +45,7 @@ type AIGatewayRoute struct {
4345

4446
// AIGatewayRouteList contains a list of AIGatewayRoute.
4547
//
48+
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
4649
// +kubebuilder:object:root=true
4750
type AIGatewayRouteList struct {
4851
metav1.TypeMeta `json:",inline"`

api/v1alpha1/ai_service_backend.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ import (
1919
// HTTPRouteSpec defined in the AIGatewayRoute), the ai-gateway will generate the necessary configuration to do
2020
// the backend specific logic in the final HTTPRoute.
2121
//
22+
// +genclient
23+
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
2224
// +kubebuilder:object:root=true
2325
// +kubebuilder:subresource:status
2426
// +kubebuilder:printcolumn:name="Status",type=string,JSONPath=`.status.conditions[-1:].type`
@@ -33,6 +35,7 @@ type AIServiceBackend struct {
3335

3436
// AIServiceBackendList contains a list of AIServiceBackends.
3537
//
38+
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
3639
// +kubebuilder:object:root=true
3740
type AIServiceBackendList struct {
3841
metav1.TypeMeta `json:",inline"`

api/v1alpha1/backendsecurity_policy.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ const (
2727
// BackendSecurityPolicy specifies configuration for authentication and authorization rules on the traffic
2828
// exiting the gateway to the backend.
2929
//
30+
// +genclient
31+
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
3032
// +kubebuilder:object:root=true
3133
// +kubebuilder:subresource:status
3234
// +kubebuilder:printcolumn:name="Status",type=string,JSONPath=`.status.conditions[-1:].type`
@@ -99,6 +101,7 @@ type BackendSecurityPolicySpec struct {
99101

100102
// BackendSecurityPolicyList contains a list of BackendSecurityPolicy
101103
//
104+
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
102105
// +kubebuilder:object:root=true
103106
type BackendSecurityPolicyList struct {
104107
metav1.TypeMeta `json:",inline"`

api/v1alpha1/client/clientset/versioned/clientset.go

Lines changed: 109 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)