Skip to content
Merged
Show file tree
Hide file tree
Changes from 30 commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
b4acbe3
initial agent gw integration
npolshakova May 2, 2025
7fcb058
Merge branch 'main' into agent-gateway-integration
npolshakova May 6, 2025
09ad890
test setup
npolshakova May 6, 2025
473133f
Merge branch 'main' into agent-gateway-integration
npolshakova May 7, 2025
2ecefd8
fix github workflow
npolshakova May 7, 2025
4a51537
e2e test
npolshakova May 8, 2025
88f3669
remove deployer agentGatewayIntegrationEnabled field
npolshakova May 8, 2025
be612a1
Merge remote-tracking branch 'origin/main' into agent-gateway-integra…
npolshakova May 8, 2025
3966be8
set EnableAgentGateway unit test
npolshakova May 8, 2025
78f8857
feedback
npolshakova May 9, 2025
11564f8
Merge branch 'main' into agent-gateway-integration
npolshakova May 9, 2025
cab759b
add agentgateway api to generate-all
npolshakova May 9, 2025
b52a4a7
Merge branch 'main' into agent-gateway-integration
npolshakova May 13, 2025
2a33200
Merge branch 'main' into agent-gateway-integration
npolshakova May 13, 2025
41231b6
allowed routes support
npolshakova May 13, 2025
f6a4ab3
consistent naming
npolshakova May 13, 2025
5dc9988
clean up
npolshakova May 14, 2025
aa2dfe4
feedback
npolshakova May 14, 2025
bc6a97a
add helm default value
npolshakova May 15, 2025
d5199b3
Merge branch 'main' into agent-gateway-integration
npolshakova May 15, 2025
aac66f7
feedback
npolshakova May 19, 2025
d6b8aa6
feedback self managed gw
npolshakova May 19, 2025
8fe162b
typo
npolshakova May 19, 2025
bf26449
fix image name
npolshakova May 19, 2025
6f84bed
Merge remote-tracking branch 'origin/main' into agent-gateway-integra…
npolshakova May 19, 2025
014bf20
fix slog merge
npolshakova May 19, 2025
0929383
feedback
npolshakova May 19, 2025
d6e68c3
typo
npolshakova May 19, 2025
238bdb4
agentgateway matrix value
npolshakova May 19, 2025
7a0af56
add listener version
npolshakova May 19, 2025
430d601
Merge remote-tracking branch 'origin/main' into agent-gateway-integra…
npolshakova May 19, 2025
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
8 changes: 7 additions & 1 deletion .github/actions/setup-kind-cluster/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ inputs:
required: false
default: "false"
description: Whether to install localstack
agentgateway:
required: false
default: "false"
description: Enable the agentgateway integration with kgateway

runs:
using: "composite"
Expand All @@ -48,6 +52,8 @@ runs:
ISTIO_VERSION: ${{ inputs.istio-version }}
CONFORMANCE_VERSION: ${{ inputs.kgateway-api-version }}
LOCALSTACK: ${{ inputs.localstack }}
AGENTGATEWAY: ${{ inputs.agentgateway }}
# AI Tests rely on metal LB
CONFORMANCE: true
run: ./hack/kind/setup-kind.sh
run: |
./hack/kind/setup-kind.sh
6 changes: 6 additions & 0 deletions .github/workflows/pr-kubernetes-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ jobs:
go-test-args: '-v -timeout=25m'
go-test-run-regex: '^TestAIExtension'
localstack: 'false'
# May 6, 2025: 5 minutes
- cluster-name: 'agent-gateway-cluster'
go-test-args: '-v -timeout=25m'
go-test-run-regex: '^TestAgentGatewayIntegration'
agentgateway: 'true'

# # Dec 4, 2024: 23 minutes
# - cluster-name: 'cluster-two'
Expand Down Expand Up @@ -109,6 +114,7 @@ jobs:
helm-version: ${{ steps.dotenv.outputs.helm_version }}
istio-version: ${{ steps.dotenv.outputs.istio_version }}
localstack: ${{ matrix.test.localstack }}
agentgateway: ${{ matrix.test.agentgateway }}
- id: run-tests
uses: ./.github/actions/kubernetes-e2e-tests
with:
Expand Down
11 changes: 11 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -772,6 +772,17 @@ kind-list-images: ## List solo-io images in the kind cluster named {CLUSTER_NAME
kind-prune-images: ## Remove images in the kind cluster named {CLUSTER_NAME}
docker exec -ti $(CLUSTER_NAME)-control-plane crictl rmi --prune

#----------------------------------------------------------------------------------
# A2A Test Server (for agentgateway a2a integration in e2e tests)
#----------------------------------------------------------------------------------

TEST_A2A_AGENT_SERVER_DIR := $(ROOTDIR)/test/kubernetes/e2e/features/agentgateway/a2a-example
.PHONY: test-a2a-agent-docker
test-a2a-agent-docker:
docker buildx build $(LOAD_OR_PUSH) $(PLATFORM_MULTIARCH) -f $(TEST_A2A_AGENT_SERVER_DIR)/Dockerfile $(TEST_A2A_AGENT_SERVER_DIR) \
-t $(IMAGE_REGISTRY)/test-a2a-agent:$(VERSION)


#----------------------------------------------------------------------------------
# AI Extensions Test Server (for mocking AI Providers in e2e tests)
#----------------------------------------------------------------------------------
Expand Down
32 changes: 32 additions & 0 deletions api/applyconfiguration/api/v1alpha1/agentgateway.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions api/applyconfiguration/api/v1alpha1/kubernetesproxyconfig.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions api/applyconfiguration/internal/internal.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions api/applyconfiguration/utils.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

40 changes: 40 additions & 0 deletions api/v1alpha1/gateway_parameters_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,11 @@ type KubernetesProxyConfig struct {
// +kubebuilder:validation:Optional
AiExtension *AiExtension `json:"aiExtension,omitempty"`

// Configure the AgentGateway integration
//
// +kubebuilder:validation:Optional
AgentGateway *AgentGateway `json:"agentGateway,omitempty"`

// Used to unset the `runAsUser` values in security contexts.
FloatingUserId *bool `json:"floatingUserId,omitempty"`
}
Expand Down Expand Up @@ -187,6 +192,13 @@ func (in *KubernetesProxyConfig) GetAiExtension() *AiExtension {
return in.AiExtension
}

func (in *KubernetesProxyConfig) GetAgentGateway() *AgentGateway {
if in == nil {
return nil
}
return in.AgentGateway
}

func (in *KubernetesProxyConfig) GetFloatingUserId() *bool {
if in == nil {
return nil
Expand Down Expand Up @@ -746,3 +758,31 @@ func (in *CustomLabel) GetKeyDelimiter() *string {
}
return in.KeyDelimiter
}

// Configuration of the AgentGateway integration
type AgentGateway struct {
// Whether to enable the extension.
//
// +kubebuilder:validation:Optional
Enabled *bool `json:"enabled,omitempty"`

// Log level for the agentgateway. Defaults to info.
// Levels include "trace", "debug", "info", "error", "warn". See: https://docs.rs/tracing/latest/tracing/struct.Level.html
//
// +kubebuilder:validation:Optional
LogLevel *string `json:"logLevel,omitempty"`
}

func (in *AgentGateway) GetEnabled() *bool {
if in == nil {
return nil
}
return in.Enabled
}

func (in *AgentGateway) GetLogLevel() *string {
if in == nil {
return nil
}
return in.LogLevel
}
30 changes: 30 additions & 0 deletions api/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ require (
github.com/Microsoft/go-winio v0.6.2 // indirect
github.com/OpenPeeDeeP/depguard/v2 v2.2.1 // indirect
github.com/ProtonMail/go-crypto v1.0.0 // indirect
// TODO: pin to release version. Needed https://github.com/agentgateway/agentgateway/pull/115 for go mod fix
github.com/agentgateway/agentgateway v0.4.31-0.20250519135723-61536c2b3fa0
github.com/alecthomas/go-check-sumtype v0.3.1 // indirect
github.com/alexkohler/nakedret/v2 v2.0.5 // indirect
github.com/alexkohler/prealloc v1.0.0 // indirect
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,8 @@ github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMx
github.com/Shopify/toxiproxy/v2 v2.1.6-0.20210914104332-15ea381dcdae/go.mod h1:/cvHQkZ1fst0EmZnA5dFtiQdWCNCFYzb+uE2vqVgvx0=
github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d h1:licZJFw2RwpHMqeKTCYkitsPqHNxTmd4SNR5r94FGM8=
github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d/go.mod h1:asat636LX7Bqt5lYEZ27JNDcqxfjdBQuJ/MM4CN/Lzo=
github.com/agentgateway/agentgateway v0.4.31-0.20250519135723-61536c2b3fa0 h1:4THComsdsccCKRdO3lFinPZId6/ISSk6ijEiO44KJps=
github.com/agentgateway/agentgateway v0.4.31-0.20250519135723-61536c2b3fa0/go.mod h1:geHd31xH5d8OrCRuRyvnDxBeqSZ9+O9VhL8VJAfcA+E=
github.com/alcortesm/tgz v0.0.0-20161220082320-9c5fe88206d7/go.mod h1:6zEj6s6u/ghQa61ZWa/C2Aw3RkjiTBOix7dkqa1VLIs=
github.com/alecthomas/assert/v2 v2.11.0 h1:2Q9r3ki8+JYXvGsDyBXwH3LcJ+WK5D0gc5E8vS6K3D0=
github.com/alecthomas/assert/v2 v2.11.0/go.mod h1:Bze95FyfUr7x34QZrjL+XP+0qgp/zg8yS+TtBj1WA3k=
Expand Down
4 changes: 4 additions & 0 deletions hack/kind/setup-kind.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ else
if [[ $CONFORMANCE == "true" ]]; then
VERSION=$VERSION make kind-build-and-load-test-ai-provider
fi

if [[ $AGENTGATEWAY == "true" ]]; then
VERSION=$VERSION make kind-build-and-load-test-a2a-agent
fi
fi

# 5. Build the gloo command line tool, ensuring we have one in the `_output` folder
Expand Down
1 change: 1 addition & 0 deletions hack/utils/oss_compliance/osa_provided.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Name|Version|License
---|---|---
[agentgateway/agentgateway](https://github.com/agentgateway/agentgateway)|v0.4.31-0.20250519135723-61536c2b3fa0|Apache License 2.0
[avast/retry-go](https://github.com/avast/retry-go)|v2.4.3+incompatible|MIT License
[retry-go/v4](https://github.com/avast/retry-go)|v4.3.3|MIT License
[caarlos0/log](https://github.com/caarlos0/log)|v0.4.6|MIT License
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,13 @@ spec:
properties:
kube:
properties:
agentGateway:
properties:
enabled:
type: boolean
logLevel:
type: string
type: object
aiExtension:
properties:
enabled:
Expand Down
4 changes: 4 additions & 0 deletions install/helm/kgateway/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@ spec:
value: {{ $value | quote }}
{{- end }}
{{- end }}
{{- if .Values.agentGateway.enabled }}
- name: KGW_ENABLE_AGENT_GATEWAY
value: "true"
{{- end }}
# TODO: Remove this once the cleanup is done. Required as the gloo-system
# namespace is the default namespace and conformance will fail as a result.
- name: POD_NAMESPACE
Expand Down
3 changes: 3 additions & 0 deletions install/helm/kgateway/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,6 @@ image:
inferenceExtension:
enabled: false
autoProvision: false

agentGateway:
enabled: false
11 changes: 11 additions & 0 deletions internal/kgateway/agentgatewaysyncer/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# agentgateway syncer

This syncer configures xds updates for the [agentgateway](https://agentgateway.dev/) data plane.

### APIs

The syncer uses the following APIs:

- [a2a](https://github.com/agentgateway/agentgateway/tree/main/go/api/a2a/a2a)
- [mcp](https://github.com/agentgateway/agentgateway/tree/main/go/api/mcp/mcp)
- [listener](https://github.com/agentgateway/agentgateway/tree/main/go/api/listener)
16 changes: 16 additions & 0 deletions internal/kgateway/agentgatewaysyncer/const.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package agentgatewaysyncer

const (
TargetTypeA2AUrl = "type.googleapis.com/agentgateway.dev.a2a.target.Target"
TargetTypeMcpUrl = "type.googleapis.com/agentgateway.dev.mcp.target.Target"
TargetTypeListenerUrl = "type.googleapis.com/agentgateway.dev.listener.Listener"

MCPProtocol = "kgateway.dev/mcp"
A2AProtocol = "kgateway.dev/a2a"

MCPPathAnnotation = "kgateway.dev/mcp-path"
A2APathAnnotation = "kgateway.dev/a2a-path"

// Needs to match agentgateway role configured here: https://github.com/agentgateway/agentgateway/blob/main/crates/agentgateway/src/xds/client.rs#L293
OwnerNodeId = "agentgateway-api"
)
Loading