40 Commits

Author SHA1 Message Date
John Howard
8b96e4da5c
controller: faster deployer tests (#1469)
With -race, this took 53s on my fast machine before. now it takes 3.

The problem was we parsed all CRDs each time, now we do it once (and
ruse more code)
2026-04-07 10:46:48 -07:00
Nina Polshakova
fff0ec3e85
Use agentgateway.dev annotations (#1439)
Clean up to remove kgateway.dev annotations, but keep backwards
compatibility.

Signed-off-by: npolshakova <nina.polshakova@solo.io>
2026-04-02 12:37:23 -04:00
John Howard
8f0e00850d
controller: stricter controller securityContext by default (#1406) 2026-04-01 10:34:45 -05:00
John Howard
f35f0f8f35
mcp authentication: move to route level (#1357)
Currently, mcpAuthentication is a backend level policy. This sort of
made sense at the time, as its only applicable for MCP, and "is MCP" is
a property of the backend. However, in practice this causes issues.

McpAuth is a glorified JWT validator with some additional special path
handling. One of the things you might want to use JWT/MCPAuth for is
apply other policies based on the claims. Authorization, rate limit,
transformations, etc
all based on the jwt claims are quite handy and common.

The alternative to this is to start copying every single policy to an
mcpXYZ policy which sucks.

----

This would be the first time the project faces a serious "deprecating an
API" so warrants some thinking. In this case I propose:
* The old backend policy is kept around in Kubernetes and marked as
deprecated. We can keep the field around for a very long time (forever?)
without too much burden on the project as its pretty much the same
translation regardless of where it is
* Standalone is not impacted; we already had users set it in the route
level and just translated it down to a backend policy.
* If a user sets both, we reject the backend one (TODO: this is not done
in this PR)
* If a user sets JWT and MCP auth, we prefer whichever is more precise.
(TODO: this is not done in this PR)

Fixes https://github.com/agentgateway/agentgateway/issues/870
2026-03-30 09:49:13 -07:00
John Howard
b440fb4d5e
Controller: refactor dead code and weird packages (#1375)
Lots of cruft cleanup from the old kgw integration.

fixes https://github.com/agentgateway/agentgateway/issues/1288
2026-03-27 13:16:29 -07:00
Lawrence G.
aa196aa940
helm: add valueFrom support to extraEnv (#1329)
extends the `controller.extraEnv` value to support `valueFrom` K8s
sources, e.g. `Secrets`

Signed-off-by: Lawrence Gadban <lawrence.gadban@solo.io>
2026-03-24 08:05:36 -07:00
Jordan Moore
9dc73c0267
garbage collection for unneeded pdb/hpa/vpa (#1183)
When a Gateway or GatewayParameters is updated or deleted such that a
previously-created PodDisruptionBudget, HorizontalPodAutoscaler, or
VerticalPodAutoscaler is no longer required, the controller does not
currently remove those resources. This is a resource leak.

ownerReferences-based garbage collection is insufficient here because it
only fires when the owner is deleted — if the owner (e.g. the Gateway)
still exists but has been updated to no longer require a PDB/HPA/VPA,
Kubernetes will not clean up the now-orphaned resource.

The `PruneRemovedResources` method on the `Deployer` collects
pdb/hpa/vpa resources owned by the reconciling gateway and checks them
against the list of desired objects and prunes those which are
undesired.
2026-03-12 20:48:48 +00:00
Nina Polshakova
ab95c0233d
Add OTel access log config and fix initialization (#1182)
`SdkLoggerProvider` was getting created on every request then dropped.
This change stores it in AccessLogPolicy like we do with tracing and
reuses it.

Fixes logging dropping after each request:
```
2026-03-10T17:29:04.939310Z     info    opentelemetry_sdk               name="LoggerProvider.Drop""Last reference of LoggerProvider dropped, initiating shutdown."
```

Also adds controller api for OTel access logging, you can configure it
with a frontend AgentgatewayPolicy like this:
```
apiVersion: agentgateway.dev/v1alpha1
kind: AgentgatewayPolicy
metadata:
  name: agw-accesslog
  namespace: agentgateway-base
spec:
  targetRefs:
    - kind: Gateway
      name: gateway
      group: gateway.networking.k8s.io
  frontend:
    accessLog:
      otlp:
        backendRef:
          name: opentelemetry-collector
          namespace: default
          port: 4317
        protocol: GRPC
```

Updates the tracing e2e test to be shared with a new access log e2e test
under "otel". The new access log test exports to otel:
```
Attributes:
     -> gateway: Str(agentgateway-base/gateway)
     -> listener: Str(http)
     -> route: Str(agentgateway-base/httpbin-route-accesslog)
     -> endpoint: Str(10.244.0.8:80)
     -> src.addr: Str(127.0.0.1:38924)
     -> http.method: Str(GET)
     -> http.host: Str(www.example.com)
     -> http.path: Str(/status/200)
     -> http.version: Str(HTTP/1.1)
     -> http.status: Int(200)
     -> protocol: Str(http)
     -> duration: Str(0ms)
Trace ID:
Span ID:
Flags: 0
    {"resource": {"service.instance.id": "84b087fa-a32c-4986-8b7e-dc213d07451b", "service.name": "otelcol-contrib", "serv
ice.version": "0.143.0"}, "otelcol.component.id": "debug", "otelcol.component.kind": "exporter", "otelcol.signal": "logs"
}
2026-03-11T17:49:58.623Z    info    Logs    {"resource": {"service.instance.id": "84b087fa-a32c-4986-8b7e-dc213d07451b",
"service.name": "otelcol-contrib", "service.version": "0.143.0"}, "otelcol.component.id": "debug", "otelcol.component.kin
d": "exporter", "otelcol.signal": "logs", "resource logs": 1, "log records": 1}
2026-03-11T17:49:58.623Z    info    ResourceLog #0
Resource SchemaURL:
Resource attributes:
     -> service.instance.id: Str(agentgateway~10.244.0.17~gateway-59dbf946f9-n2kvl.agentgateway-base~agentgateway-base.sv
c.cluster.local)
     -> service.version: Str(v0.6.0-1122-g49a81bd6d-dirty)
     -> telemetry.sdk.language: Str(rust)
     -> k8s.namespace.name: Str(agentgateway-base)
     -> service.name: Str(gateway)
     -> k8s.node.name: Str(gateway-59dbf946f9-n2kvl)
     -> k8s.pod.ip: Str(10.244.0.17)
     -> telemetry.sdk.name: Str(opentelemetry)
     -> k8s.pod.name: Str(gateway-59dbf946f9-n2kvl)
     -> service.namespace: Str(agentgateway-base)
     -> telemetry.sdk.version: Str(0.31.0)
     -> host.name: Str(gateway.agentgateway-base.svc.cluster.local)
ScopeLogs #0
ScopeLogs SchemaURL:
InstrumentationScope request
LogRecord #0
ObservedTimestamp: 2026-03-11 17:49:58.313535005 +0000 UTC
Timestamp: 1970-01-01 00:00:00 +0000 UTC
SeverityText: INFO
SeverityNumber: Info(9)
Body: Empty()
```

---------

Signed-off-by: npolshakova <nina.polshakova@solo.io>
2026-03-12 13:22:30 -04:00
John Howard
b091165dd9
Drop more 'kgateway' names (#1198)
* Drop a 'kgateway' label that had no use
* Change metrics to agentgateway_ prefix instead of kgateway_
* Use agentgateway as aud in xds token but support the old one in the
  control plane for compat
2026-03-11 14:16:47 -07:00
Nina Polshakova
e88dfb4468
Add more eviction config (#1153)
Fixes: https://github.com/agentgateway/agentgateway/issues/1139 
- Adds e2e test for model failover eviction example 
- Adds fields for configuring active health check: 
- consecutiveFailures (count of how many unhealthyExpression before
evicting)
- restoreHealth (health score to set after expression becomes healthy
again)
- healthThreshold (EWMA (exponentially-weighted moving average) health
score threshold when a backend should get evicted)
- makes unhealthyExpression optional, defaults to unhealthy 4xx or 5xx
or connection failure lowering the health score
- maxEvictionPercent (maximum percentage (0–100) of backends in a
priority group that may be evicted simultaneously to prevent cascading
failures)
   - maxEjectionTime (upper bound on ejection time) 

**Testing consecutiveFailures:**
```
❯ cat config.yaml
binds:
- port: 3000
  listeners:
  - name: llm-failover
    protocol: HTTP
    routes:
    - backends:
      - ai:
          groups:
          # Priority 0 – primary: try OpenAI first
          - providers:
            - name: openai
              provider:
                openAI:
                  model: gpt-4
          # Priority 1 – fallback: local Llama via Ollama
          - providers:
            - name: llama
              hostOverride: "localhost:11434"
              pathOverride: /v1/chat/completions
              provider:
                openAI:
                  model: llama3.2
        policies:
          health:
            unhealthyExpression: "response.code >= 500"
            eviction:
               duration: 30s
               restoreHealth: 0
               # healthThreshold: 1.0 # if this is set, OR with consecutiveFailures
               consecutiveFailures: 3
      policies:
        backendAuth:
          key: "${OPENAI_API_KEY}"
```

Send requests:
```
❯ curl http://localhost:3000/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{"model": "any", "messages": [{"role": "user", "content": "Say hello in one sentence."}]}'
upstream call failed: Connect: Connection refused (os error 61)%

❯ curl http://localhost:3000/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{"model": "any", "messages": [{"role": "user", "content": "Say hello in one sentence."}]}'
upstream call failed: Connect: Connection refused (os error 61)%

❯ curl http://localhost:3000/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{"model": "any", "messages": [{"role": "user", "content": "Say hello in one sentence."}]}'
upstream call failed: Connect: Connection refused (os error 61)%

# third time's the charm
❯ curl http://localhost:3000/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{"model": "any", "messages": [{"role": "user", "content": "Say hello in one sentence."}]}'
{"model":"llama3.2","usage":{"prompt_tokens":31,"completion_tokens":3,"total_tokens":34},"choices":[{"message":{"content":"Hello!","role":"assistant"},"index":0,"finish_reason":"stop"}],"id":"chatcmpl-229","object":"chat.completion","created":1772829061,"system_fingerprint":"fp_ollama"}%
```

Logs:
```
=/v1/chat/completions http.version=HTTP/1.1 http.status=503 protocol=llm gen_ai.operation.name=chat gen_ai.provider.name=openai gen_ai.request.model=gpt-4 error="upstream call failed: Connect: Connection refused (os error 61)" reason=UpstreamFailure duration=175ms
2026-03-09T19:27:07.457590Z     info    request gateway=default/default listener=llm-failover route=default/route0 endpoint=api.openai.com:443 src.addr=[::1]:62045 http.method=POST http.host=localhost http.path=/v1/chat/completions http.version=HTTP/1.1 http.status=503 protocol=llm gen_ai.operation.name=chat gen_ai.provider.name=openai gen_ai.request.model=gpt-4 error="upstream call failed: Connect: Connection refused (os error 61)" reason=UpstreamFailure duration=0ms
2026-03-09T19:27:08.312409Z     info    request gateway=default/default listener=llm-failover route=default/route0 endpoint=api.openai.com:443 src.addr=[::1]:62047 http.method=POST http.host=localhost http.path=/v1/chat/completions http.version=HTTP/1.1 http.status=503 protocol=llm gen_ai.operation.name=chat gen_ai.provider.name=openai gen_ai.request.model=gpt-4 error="upstream call failed: Connect: Connection refused (os error 61)" reason=UpstreamFailure duration=0ms
2026-03-09T19:27:09.485435Z     info    request gateway=default/default listener=llm-failover route=default/route0 endpoint=localhost:11434 src.addr=[::1]:62049 http.method=POST http.host=localhost http.path=/v1/chat/completions http.version=HTTP/1.1 http.status=200 protocol=llm gen_ai.operation.name=chat gen_ai.provider.name=openai gen_ai.request.model=llama3.2 gen_ai.response.model=llama3.2 gen_ai.usage.input_tokens=31 gen_ai.usage.output_tokens=3 duration=159ms
```

With `restoreHealth: 1.0`
```
        policies:
          health:
            unhealthyExpression: "response.code >= 500"
            eviction:
               duration: 10s
               healthThreshold: .5
               restoreHealth: 1.0
```

```
# same as before, first three requests fails
curl -s http://localhost:3000/v1/chat/completions -H "Content-Type: application/json" -d '{"model":"any","messages":[{"role":"user","content":"hello"}]}'
echo ""

curl -s http://localhost:3000/v1/chat/completions -H "Content-Type: application/json" -d '{"model":"any","messages":[{"role":"user","content":"hello"}]}'
echo ""

curl -s http://localhost:3000/v1/chat/completions -H "Content-Type: application/json" -d '{"model":"any","messages":[{"role":"user","content":"hello"}]}'
echo ""

# fourth request should succeed 
curl -s http://localhost:3000/v1/chat/completions -H "Content-Type: application/json" -d '{"model":"any","messages":[{"role":"user","content":"hello"}]}'
echo ""

# Waiting 12s for uneviction 
sleep 12

# Phase 2: After uneviction (healthOnReturn=false → health still ~0.34) 

# expect: primary 503, health 0.34<0.5, IMMEDIATELY RE-EVICTED)
curl -s http://localhost:3000/v1/chat/completions -H "Content-Type: application/json" -d '{"model":"any","messages":[{"role":"user","content":"hello"}]}'
echo ""

# expect: Ollama 200 
curl -s http://localhost:3000/v1/chat/completions -H "Content-Type: application/json" -d '{"model":"any","messages":[{"role":"user","content":"hello"}]}'
echo ""
```
Versus if `restoreHealth: 1.0`, then the proxy would allow three more
requests to the failing open ai endpoint before evicting.

---------

Signed-off-by: npolshakova <nina.polshakova@solo.io>
2026-03-10 09:46:01 -07:00
apexlnc
a2fa5061d4
controller: reconcile per-gateway session keys (#1160)
Move session key management into the controller-managed object set
instead of creating Secrets as a side effect of Helm value generation.

This makes the per-Gateway Secret the authoritative source of truth for
managed Gateways:
- build and append a managed Secret child object during post-processing
- watch Secret changes so Gateway reconciliation repairs drift and
deletion
- validate existing keys before reuse and generate deterministic test
keys
- reserve SESSION_KEY and SESSION_KEY_FILE in AGWP env for managed
Gateways
- prefer the mounted session key file over env and inline fallback in
the dataplane

Refresh deployer goldens and generated CRD/schema output.

Motivation for this is ergonomics for this :
https://github.com/agentgateway/agentgateway/pull/878
2026-03-10 00:02:27 +00:00
John Howard
76e7e51442
Bump go and python deps (#1131) 2026-03-09 16:20:54 -07:00
Nina Polshakova
39fa545663
Add cel-based eviction policy for backends (#1105)
Evict on 5xx / connection failure so the next request can fail over for
model failover.

Now with cel-based backend policy:
```
binds:
- port: 3000
  listeners:
  - name: llm-failover
    protocol: HTTP
    routes:
    - backends:
      - ai:
          groups:
          # Priority 0 – primary: try OpenAI first
          - providers:
            - name: openai
              provider:
                openAI:
                  model: gpt-4
          # Priority 1 – fallback: local Llama via Ollama
          - providers:
            - name: llama
              hostOverride: "localhost:11434"
              pathOverride: /v1/chat/completions
              provider:
                openAI:
                  model: llama3.2
        policies:
          health:
            unhealthyExpression: "response.code >= 500"
            eviction:
               duration: 30s
      policies:
        backendAuth:
          key: "${OPENAI_API_KEY}"
```

Currently, the behavior will still allow the first request to fail, but
then the second request will use the failover provider:
```
# error first time
❯ curl http://localhost:3000/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{"model": "any", "messages": [{"role": "user", "content": "Say hello in one sentence."}]}'
upstream call failed: Connect: Connection refused (os error 61)%                                                                  

# now failover to local model
❯ curl http://localhost:3000/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{"model": "any", "messages": [{"role": "user", "content": "Say hello in one sentence."}]}'
{"model":"llama3.2","usage":{"prompt_tokens":31,"completion_tokens":3,"total_tokens":34},"choices":[{"message":{"content":"Hello!","role":"assistant"},"index":0,"finish_reason":"stop"}],"id":"chatcmpl-498","object":"chat.completion","created":1772382504,"system_fingerprint":"fp_ollama"}%   
```

Fixes: https://github.com/kgateway-dev/kgateway/issues/13216

---------

Signed-off-by: npolshakova <nina.polshakova@solo.io>
2026-03-06 06:22:18 -08:00
John Howard
eab29a77aa
Prefix logs in setup kind script (#1132)
So we know who is sending the output
2026-03-05 10:44:26 -08:00
John Howard
39df259a08
Bump istio dep, pulling in TLSRoute v1 (#1123)
Fixes https://github.com/agentgateway/agentgateway/issues/1110
2026-03-04 13:13:30 -08:00
Nina Polshakova
72febeed94
Clean up kgateway-system names, add unit test (#1120)
- updates kgateway-system -> agentgateway-system in dev docs and unit
tests
- adds unit tests for backend AgentgatewayPolicy with multiple
targetRefs

Signed-off-by: npolshakova <nina.polshakova@solo.io>
2026-03-04 10:53:38 -08:00
Nina Polshakova
0f71c997a4
Fix e2e test setup on mac (#1117)
To test e2e tests locally on a mac you can run the setup with:
```
TEST_MODE=e2e ./controller/test/setup/setup-kind-ci.sh
```

Then run the tests with:
```
 USE_PORTFORWARD=true PERSIST_INSTALL=true CGO_ENABLED=0 go test -vet=off -ldflags='-s -w' --failfast -tags=e2e -v ./controller/test/e2e/tests -run 'TestAgentgatewayIntegration'
```
(Where the regex can select a specific test or run the full suite)

```
--- PASS: TestAgentgatewayIntegration (49.60s)
    --- PASS: TestAgentgatewayIntegration/LocalRateLimit (0.24s)
        --- SKIP: TestAgentgatewayIntegration/LocalRateLimit/TestLocalRateLimitDisabledForRoute (0.00s)
        --- PASS: TestAgentgatewayIntegration/LocalRateLimit/TestLocalRateLimitForGateway (0.05s)
        --- PASS: TestAgentgatewayIntegration/LocalRateLimit/TestLocalRateLimitForRoute (0.07s)
        --- SKIP: TestAgentgatewayIntegration/LocalRateLimit/TestLocalRateLimitForRouteUsingExtensionRef (0.00s)
    --- PASS: TestAgentgatewayIntegration/RBAC (0.13s)
        --- PASS: TestAgentgatewayIntegration/RBAC/TestRBACHeaderAuthorization (0.03s)
    --- PASS: TestAgentgatewayIntegration/MCP (12.19s)
        --- PASS: TestAgentgatewayIntegration/MCP/TestDynamicMCPAdminRouting (0.43s)
        --- PASS: TestAgentgatewayIntegration/MCP/TestDynamicMCPAdminVsUserTools (0.37s)
        --- PASS: TestAgentgatewayIntegration/MCP/TestDynamicMCPDefaultRouting (0.18s)
        --- PASS: TestAgentgatewayIntegration/MCP/TestDynamicMCPUserRouting (0.20s)
        --- PASS: TestAgentgatewayIntegration/MCP/TestMCPAuthn (3.01s)
        --- PASS: TestAgentgatewayIntegration/MCP/TestMCPWorkflow (0.21s)
        --- PASS: TestAgentgatewayIntegration/MCP/TestSSEEndpoint (0.09s)
    --- PASS: TestAgentgatewayIntegration/AIBackend (1.20s)
        --- PASS: TestAgentgatewayIntegration/AIBackend/TestPromptGuard (0.02s)
        --- PASS: TestAgentgatewayIntegration/AIBackend/TestRouting (0.01s)
        --- SKIP: TestAgentgatewayIntegration/AIBackend/TestWebhook (0.00s)
    --- PASS: TestAgentgatewayIntegration/PolicyStatus (0.17s)
        --- PASS: TestAgentgatewayIntegration/PolicyStatus/TestAgwPolicyClearStaleStatus (0.09s)
    --- PASS: TestAgentgatewayIntegration/A2A (1.18s)
        --- PASS: TestAgentgatewayIntegration/A2A/TestA2AAgentCard (0.03s)
        --- PASS: TestAgentgatewayIntegration/A2A/TestA2AHelloWorld (0.03s)
        --- PASS: TestAgentgatewayIntegration/A2A/TestA2AMessageSend (0.01s)
    --- PASS: TestAgentgatewayIntegration/BasicRouting (0.13s)
        --- PASS: TestAgentgatewayIntegration/BasicRouting/TestAgentgatewayHTTPRoute (0.04s)
        --- PASS: TestAgentgatewayIntegration/BasicRouting/TestAgentgatewayTCPRoute (0.02s)
    --- PASS: TestAgentgatewayIntegration/BackendTLSPolicy (0.34s)
        --- PASS: TestAgentgatewayIntegration/BackendTLSPolicy/TestBackendTLSPolicyAndStatus (0.20s)
    --- PASS: TestAgentgatewayIntegration/BasicAuth (0.22s)
        --- PASS: TestAgentgatewayIntegration/BasicAuth/TestGatewayPolicy (0.05s)
        --- PASS: TestAgentgatewayIntegration/BasicAuth/TestRoutePolicy (0.08s)
    --- PASS: TestAgentgatewayIntegration/JwtAuth (0.27s)
        --- PASS: TestAgentgatewayIntegration/JwtAuth/TestGatewayPolicy (0.05s)
        --- PASS: TestAgentgatewayIntegration/JwtAuth/TestGatewayPolicyWithRbac (0.04s)
        --- PASS: TestAgentgatewayIntegration/JwtAuth/TestRoutePolicy (0.06s)
        --- PASS: TestAgentgatewayIntegration/JwtAuth/TestRoutePolicyWithRbac (0.04s)
    --- PASS: TestAgentgatewayIntegration/RemoteJwtAuth (8.89s)
        --- PASS: TestAgentgatewayIntegration/RemoteJwtAuth/TestGatewayPolicyBackend (0.40s)
        --- PASS: TestAgentgatewayIntegration/RemoteJwtAuth/TestGatewayPolicyBackendWithTlsPolicy (0.92s)
        --- PASS: TestAgentgatewayIntegration/RemoteJwtAuth/TestGatewayPolicySvc (0.04s)
        --- PASS: TestAgentgatewayIntegration/RemoteJwtAuth/TestGatewayPolicySvcCaCert (1.06s)
        --- PASS: TestAgentgatewayIntegration/RemoteJwtAuth/TestGatewayPolicyWithRbac (0.88s)
        --- PASS: TestAgentgatewayIntegration/RemoteJwtAuth/TestRoutePolicyBackend (1.08s)
        --- PASS: TestAgentgatewayIntegration/RemoteJwtAuth/TestRoutePolicyBackendAndTlsPolicy (0.04s)
        --- PASS: TestAgentgatewayIntegration/RemoteJwtAuth/TestRoutePolicySvc (0.90s)
        --- PASS: TestAgentgatewayIntegration/RemoteJwtAuth/TestRoutePolicySvcCaCert (1.06s)
        --- PASS: TestAgentgatewayIntegration/RemoteJwtAuth/TestRoutePolicyWithRbac (0.89s)
    --- PASS: TestAgentgatewayIntegration/Tracing (16.41s)
        --- PASS: TestAgentgatewayIntegration/Tracing/TestOTelTracing (15.29s)
    --- PASS: TestAgentgatewayIntegration/ApiKeyAuth (0.21s)
        --- PASS: TestAgentgatewayIntegration/ApiKeyAuth/TestGatewayPolicy (0.06s)
        --- PASS: TestAgentgatewayIntegration/ApiKeyAuth/TestRoutePolicy (0.08s)
    --- PASS: TestAgentgatewayIntegration/Extauth (1.26s)
        --- PASS: TestAgentgatewayIntegration/Extauth/TestExtAuthPolicy (0.05s)
            --- PASS: TestAgentgatewayIntegration/Extauth/TestExtAuthPolicy/request_allowed_with_allow_header (0.02s)
            --- PASS: TestAgentgatewayIntegration/Extauth/TestExtAuthPolicy/request_denied_without_allow_header (0.00s)
            --- PASS: TestAgentgatewayIntegration/Extauth/TestExtAuthPolicy/request_denied_with_deny_header (0.00s)
        --- PASS: TestAgentgatewayIntegration/Extauth/TestExtAuthPolicyMissingBackendRef (0.04s)
            --- PASS: TestAgentgatewayIntegration/Extauth/TestExtAuthPolicyMissingBackendRef/request_denied_for_invalid_extauth_policy_due_to_missing_backendRef (0.02s)
        --- PASS: TestAgentgatewayIntegration/Extauth/TestRouteTargetedExtAuthPolicy (0.05s)
            --- PASS: TestAgentgatewayIntegration/Extauth/TestRouteTargetedExtAuthPolicy/request_allowed_by_default (0.00s)
            --- PASS: TestAgentgatewayIntegration/Extauth/TestRouteTargetedExtAuthPolicy/request_allowed_with_allow_header_on_secured_route (0.02s)
            --- PASS: TestAgentgatewayIntegration/Extauth/TestRouteTargetedExtAuthPolicy/request_denied_without_header_on_secured_route (0.01s)
    --- PASS: TestAgentgatewayIntegration/GlobalRateLimit (4.42s)
        --- PASS: TestAgentgatewayIntegration/GlobalRateLimit/TestCombinedLocalAndGlobalRateLimit (0.07s)
        --- PASS: TestAgentgatewayIntegration/GlobalRateLimit/TestGlobalRateLimitByPath (0.07s)
        --- PASS: TestAgentgatewayIntegration/GlobalRateLimit/TestGlobalRateLimitByRemoteAddress (0.06s)
        --- PASS: TestAgentgatewayIntegration/GlobalRateLimit/TestGlobalRateLimitByUserID (0.04s)
    --- PASS: TestAgentgatewayIntegration/Transformation (0.19s)
        --- PASS: TestAgentgatewayIntegration/Transformation/TestGatewayWithTransformedGRPCRoute (0.06s)
        --- PASS: TestAgentgatewayIntegration/Transformation/TestGatewayWithTransformedHTTPRoute (0.05s)
    --- PASS: TestAgentgatewayIntegration/CSRF (0.13s)
        --- PASS: TestAgentgatewayIntegration/CSRF/TestGatewayLevelCSRF (0.06s)
    --- PASS: TestAgentgatewayIntegration/Extproc (1.71s)
        --- PASS: TestAgentgatewayIntegration/Extproc/TestExtProcWithGatewayTargetRef (0.06s)
            --- PASS: TestAgentgatewayIntegration/Extproc/TestExtProcWithGatewayTargetRef/first_route_should_have_ExtProc_applied_via_Gateway_policy (0.01s)
            --- PASS: TestAgentgatewayIntegration/Extproc/TestExtProcWithGatewayTargetRef/second_route_also_has_ExtProc_applied_via_Gateway_policy (0.00s)
        --- PASS: TestAgentgatewayIntegration/Extproc/TestExtProcWithHTTPRouteTargetRef (0.03s)
            --- PASS: TestAgentgatewayIntegration/Extproc/TestExtProcWithHTTPRouteTargetRef/route_with_ExtProc_applied_should_have_header_modified (0.00s)
            --- PASS: TestAgentgatewayIntegration/Extproc/TestExtProcWithHTTPRouteTargetRef/route_without_ExtProc_should_not_have_header_modified (0.00s)
PASS
ok      github.com/agentgateway/agentgateway/controller/test/e2e/tests  50.401s

```

Changes made:
- `USE_PORTFORWARD` will run the tests with the gateway port-forwarded,
removing the dependency of having to set up the cloud provider kind
workaround https://github.com/kubernetes-sigs/cloud-provider-kind
- Small fixes to makefile to reflect new agentgateway repo paths 
- Fixes setup script to work with mac commands (`wait` fix for sibling
pids, fix proxy build)
- Introduce `docker-ci` to have a fast version of building locally

---------

Signed-off-by: npolshakova <nina.polshakova@solo.io>
2026-03-04 12:47:34 -05:00
John Howard
e9496ade0a
e2e: consolidate test helpers into a single unified deployment (#1098)
Before we had like 10 pods we need to pull to run tests, about half
pulled and half built. Now most of these are bundled into one pod
speeding up tests and simplfying things a lot
2026-03-04 06:24:45 -08:00
John Howard
cde3b1b3fb
Gateway API v1.5.0 (#1068) 2026-03-02 16:41:24 -08:00
David L. Chandler
b2f5ab6d52
Revert "fix: Overlays can delete map elements with 'null'" (#1079)
Reverts agentgateway/agentgateway#1065 because the unittests didn't use
a real k8s API server. A real k8s rejects any CRD that attempts to use a
null map value, and you cannot easily change the CRD because
controller-tools is opinionated about that. I don't want to add new
'remove' APIs for this edge case or kustomize a CRD.
2026-02-27 11:20:43 -08:00
David L. Chandler
dabab1f08c
fix: Overlays can delete map elements with 'null' (#1065)
Fixes a TODO:
```
    metadata:
      labels:
        # You'd think this would remove the app.kubernetes.io/instance label,
        # but it just sets the label to the empty string. TODO(chandler):
        # Figure out the incantation to cause removal of the label.
        app.kubernetes.io/instance: null
```

---------

Signed-off-by: David L. Chandler <david.chandler@solo.io>
2026-02-26 13:32:27 -08:00
John Howard
0c5208cf24
e2e: do not always pull website fetcher (#1046)
I am pretty sure this is making the test flaky. we pre-pull it in the
setup phase so pulling again is redundant anyway
2026-02-24 12:21:12 -08:00
John Howard
73c7e29604
controller: if there are no listeners, deploy a dummy port (#988)
gateway api is going to make listener optional:
https://github.com/kubernetes-sigs/gateway-api/issues/4425. The problem
is, if you go 0 listeners, the service is invalid. Worse, if you go
0->1->0 we would lose the service IP!

So we put a dummy one.
2026-02-19 08:28:53 -08:00
David L. Chandler
7cd8176bcc
Removes envoy-related code (#989)
- removes golden files from the kgateway era
- removes goreleaser config & make target

This is not comprehensive.

---------

Signed-off-by: David L. Chandler <david.chandler@solo.io>
2026-02-19 08:07:45 -08:00
David L. Chandler
1367e0bf9d
test(deployer): add cookbook recipe helm overlay tests (#976)
Adds test cases inspired by [agentgateway user
docs](https://github.com/agentgateway/website/pull/142)

Signed-off-by: David L. Chandler <david.chandler@solo.io>
2026-02-16 11:00:13 -08:00
Nina Polshakova
f1b238e8d4
Add more kgateway pieces (#968)
Signed-off-by: npolshakova <nina.polshakova@solo.io>
2026-02-16 08:05:34 -08:00
John Howard
aa24bb7daa
Bump go.mod, notably GIE to v1.3 (#953)
Passing conformance locally. In preperation for v1.5 GW API which will
be much bigger
2026-02-12 16:37:19 -08:00
John Howard
4c49a1ba16
ci: debug e2e tests (#947) 2026-02-12 12:19:37 -08:00
John Howard
76a4fe2c4b
Remove deadcode from e2e tests (#948)
Also fix a missing namespace on the JWKS test causing failures
2026-02-12 10:26:16 -08:00
John Howard
e343ebed2f
Run e2e tests in CI (#938) 2026-02-12 09:52:06 -08:00
John Howard
ff94b54974
Cherrypick HPA/PDB RBAC fix (#939)
https://github.com/agentgateway/agentgateway/issues/908
2026-02-11 09:59:24 -08:00
Nina Polshakova
aefb466b19
Makefile fixes in controller (#931)
The release workflow now publishes the controller package too. Tested it
on my fork: https://github.com/npolshakova/agentgateway/packages

Currently tested:
- [x] make generate-all
- [x] make analyze
- [x] make fmt
- [x] make unit - passing
- [x] make run 
- [x] make package-agentgateway-charts
- [x] make kind-build-and-load 
- [x]  make kind-load-agentgateway

---------

Signed-off-by: npolshakova <nina.polshakova@solo.io>
2026-02-11 08:23:27 -08:00
John Howard
b3b74839c2
controller: inference pool status v2 (#932)
The old inference pool status controller was heavily tied to envoy code
we ripped out. This adds it back in following the native agentgateway
patterns.

This is passing all v1.1.0 conformance tests, except a test I believe is
fundamentally broken itself and just has a low chance of passing for a
correct implementation (working to get that fixed)
2026-02-10 20:47:31 -08:00
John Howard
9b0bbcaac7 Cleanup more dead code 2026-02-10 12:10:18 -08:00
John Howard
36edb13f9f fix e2e path 2026-02-10 12:06:19 -08:00
John Howard
3447701669 Setup end to end test 2026-02-10 11:24:44 -08:00
John Howard
a389021575 Agentgateway: Support full BackendTLSPolicy spec (including status) (#13209)
Signed-off-by: John Howard <john.howard@solo.io>
2026-02-10 10:22:54 -08:00
David L. Chandler
739eae0c34 fix: AgentgatewayParameters did not merge deeply (#13468)
Signed-off-by: David L. Chandler <david.chandler@solo.io>
2026-02-10 10:22:54 -08:00
John Howard
c2ea90ed08 Various repo cleanups and re-organization 2026-02-10 10:22:51 -08:00
John Howard
085f54292b Move controller to controller/ 2026-02-09 16:20:45 -08:00