Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
apiVersion: gateway.kgateway.dev/v1alpha1
kind: AgentGatewayPolicy
Copy link

Copilot AI Nov 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Corrected spelling of 'AgentGatewayPolicy' to 'AgentgatewayPolicy'. The Kubernetes API type is defined as 'AgentgatewayPolicy' with a lowercase 'g' in 'gateway', as confirmed in api/v1alpha1/agentgateway_policy_types.go.

Suggested change
kind: AgentGatewayPolicy
kind: AgentgatewayPolicy

Copilot uses AI. Check for mistakes.
metadata:
name: traffic-combined-policy
namespace: default
spec:
targetRefs:
- group: gateway.networking.k8s.io
kind: HTTPRoute
name: test-route
traffic:
timeout:
request: 15s
idle: 2m
retries:
attempts: 2
perTryTimeout: 3s
retryOn:
- "5xx"
backoff:
baseInterval: 500ms
maxInterval: 5s
cors:
allowOrigins:
- exact: "https://example.com"
allowMethods:
- GET
- POST
maxAge: 3600s
headerManipulation:
requestHeadersToAdd:
- name: "X-API-Version"
value: "v1"
append: false
responseHeadersToAdd:
- name: "X-Frame-Options"
value: "DENY"
append: false
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
apiVersion: gateway.kgateway.dev/v1alpha1
kind: AgentGatewayPolicy
Copy link

Copilot AI Nov 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Corrected spelling of 'AgentGatewayPolicy' to 'AgentgatewayPolicy'. The Kubernetes API type is defined as 'AgentgatewayPolicy' with a lowercase 'g' in 'gateway', as confirmed in api/v1alpha1/agentgateway_policy_types.go.

Suggested change
kind: AgentGatewayPolicy
kind: AgentgatewayPolicy

Copilot uses AI. Check for mistakes.
metadata:
name: traffic-cors-policy
namespace: default
spec:
targetRefs:
- group: gateway.networking.k8s.io
kind: HTTPRoute
name: test-route
traffic:
cors:
allowOrigins:
- exact: "https://example.com"
- prefix: "https://*.example.com"
allowMethods:
- GET
- POST
- PUT
- DELETE
allowHeaders:
- "content-type"
- "authorization"
exposeHeaders:
- "x-custom-header"
maxAge: 86400s
allowCredentials: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
apiVersion: gateway.kgateway.dev/v1alpha1
kind: AgentGatewayPolicy
Copy link

Copilot AI Nov 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Corrected spelling of 'AgentGatewayPolicy' to 'AgentgatewayPolicy'. The Kubernetes API type is defined as 'AgentgatewayPolicy' with a lowercase 'g' in 'gateway', as confirmed in api/v1alpha1/agentgateway_policy_types.go.

Suggested change
kind: AgentGatewayPolicy
kind: AgentgatewayPolicy

Copilot uses AI. Check for mistakes.
metadata:
name: traffic-header-manipulation-policy
namespace: default
spec:
targetRefs:
- group: gateway.networking.k8s.io
kind: HTTPRoute
name: test-route
traffic:
headerManipulation:
requestHeadersToAdd:
- name: "X-Custom-Header"
value: "custom-value"
append: false
- name: "X-Request-ID"
value: "%REQ_ID%"
append: false
requestHeadersToRemove:
- "X-Internal-Header"
responseHeadersToAdd:
- name: "X-Response-Header"
value: "response-value"
append: false
- name: "X-Server"
value: "kgateway"
append: false
responseHeadersToRemove:
- "X-Powered-By"
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
apiVersion: gateway.kgateway.dev/v1alpha1
kind: AgentGatewayPolicy
Copy link

Copilot AI Nov 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Corrected spelling of 'AgentGatewayPolicy' to 'AgentgatewayPolicy'. The Kubernetes API type is defined as 'AgentgatewayPolicy' with a lowercase 'g' in 'gateway', as confirmed in api/v1alpha1/agentgateway_policy_types.go.

Suggested change
kind: AgentGatewayPolicy
kind: AgentgatewayPolicy

Copilot uses AI. Check for mistakes.
metadata:
name: traffic-retries-policy
namespace: default
spec:
targetRefs:
- group: gateway.networking.k8s.io
kind: HTTPRoute
name: test-route
traffic:
retries:
attempts: 3
perTryTimeout: 5s
retryOn:
- "5xx"
- "gateway-error"
- "connect-failure"
backoff:
baseInterval: 1s
maxInterval: 10s
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: gateway.kgateway.dev/v1alpha1
kind: AgentGatewayPolicy
Copy link

Copilot AI Nov 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Corrected spelling of 'AgentGatewayPolicy' to 'AgentgatewayPolicy'. The Kubernetes API type is defined as 'AgentgatewayPolicy' with a lowercase 'g' in 'gateway', as confirmed in api/v1alpha1/agentgateway_policy_types.go.

Suggested change
kind: AgentGatewayPolicy
kind: AgentgatewayPolicy

Copilot uses AI. Check for mistakes.
metadata:
name: traffic-timeout-policy
namespace: default
spec:
targetRefs:
- group: gateway.networking.k8s.io
kind: HTTPRoute
name: test-route
traffic:
timeout:
request: 30s
idle: 5m