-
Notifications
You must be signed in to change notification settings - Fork 596
feture : Add Traffic policy tests #12839
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: adity1raut <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds five new YAML test data files for traffic policy configurations. These files serve as test fixtures for the AgentGatewayPolicy API, demonstrating various traffic management features such as timeouts, retries, header manipulation, CORS, and combinations thereof.
- Adds test data for traffic policy features including timeout, retry, CORS, and header manipulation configurations
- Creates a combined traffic policy test file demonstrating multiple features together
- All files target HTTPRoute resources with policy configurations
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| traffic-timeout.yaml | Test fixture for request and idle timeout configuration |
| traffic-retries.yaml | Test fixture for retry policy with backoff configuration |
| traffic-header-manipulation.yaml | Test fixture for request/response header manipulation |
| traffic-cors.yaml | Test fixture for CORS policy configuration |
| traffic-combined.yaml | Test fixture demonstrating multiple traffic policies combined |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -0,0 +1,14 @@ | |||
| apiVersion: gateway.kgateway.dev/v1alpha1 | |||
| kind: AgentGatewayPolicy | |||
Copilot
AI
Nov 6, 2025
There was a problem hiding this comment.
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.
| kind: AgentGatewayPolicy | |
| kind: AgentgatewayPolicy |
| @@ -0,0 +1,21 @@ | |||
| apiVersion: gateway.kgateway.dev/v1alpha1 | |||
| kind: AgentGatewayPolicy | |||
Copilot
AI
Nov 6, 2025
There was a problem hiding this comment.
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.
| kind: AgentGatewayPolicy | |
| kind: AgentgatewayPolicy |
| @@ -0,0 +1,30 @@ | |||
| apiVersion: gateway.kgateway.dev/v1alpha1 | |||
| kind: AgentGatewayPolicy | |||
Copilot
AI
Nov 6, 2025
There was a problem hiding this comment.
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.
| kind: AgentGatewayPolicy | |
| kind: AgentgatewayPolicy |
| @@ -0,0 +1,27 @@ | |||
| apiVersion: gateway.kgateway.dev/v1alpha1 | |||
| kind: AgentGatewayPolicy | |||
Copilot
AI
Nov 6, 2025
There was a problem hiding this comment.
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.
| kind: AgentGatewayPolicy | |
| kind: AgentgatewayPolicy |
| @@ -0,0 +1,38 @@ | |||
| apiVersion: gateway.kgateway.dev/v1alpha1 | |||
| kind: AgentGatewayPolicy | |||
Copilot
AI
Nov 6, 2025
There was a problem hiding this comment.
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.
| kind: AgentGatewayPolicy | |
| kind: AgentgatewayPolicy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please refer to the code of conduct on AI generated code https://github.com/kgateway-dev/community/blob/main/CODE-OF-CONDUCT.md It's totally okay to use AI to help you write code, but it's important to understand what the tests are actually checking for. In this case, the yaml configs are not quiet correct (AgentGatewayPolicy -> AgentgatewayPolicy), and there's no output files for the resulting xds, and the tests are not registered to run.
Description
Fixed #12817
Change Type
/kind feature
Changelog