-
Notifications
You must be signed in to change notification settings - Fork 596
Open
Labels
Area: agentgatewayGood First IssueGood issue for newbiesGood issue for newbieshelp wantedDenotes an issue that needs help from a contributor.Denotes an issue that needs help from a contributor.
Description
The new frontend field on the AgentgatewayPolicy introduced in #12723 supports configuring:
- tcp
- tls
- http
- access logging
- tracing (todo, no translation logic)
Tasks:
- Add unit tests for missing subfields on the
frontendpolicy under https://github.com/kgateway-dev/kgateway/tree/main/internal/kgateway/agentgatewaysyncer/testdata/inputs - Add e2e tests for AgentgatewayPolicy frontend fields
For example, configuring access logs:
apiVersion: gateway.kgateway.dev/v1alpha1
kind: AgentgatewayPolicy
metadata:
name: access-log-header
namespace: default
spec:
targetRefs:
- group: gateway.networking.k8s.io
kind: Gateway
name: http-gw-for-test
frontend:
accessLog:
attributes:
add:
- name: x-user-id
expression: "request.headers['x-user-id']"
You should be able to send a request:
curl -i http://localhost:8080/get -H 'Host: www.example.com' H 'x-user-id: alice'
Then see the x-user-id: alice header logged in the agentgateway proxy logs.
Metadata
Metadata
Assignees
Labels
Area: agentgatewayGood First IssueGood issue for newbiesGood issue for newbieshelp wantedDenotes an issue that needs help from a contributor.Denotes an issue that needs help from a contributor.