feat: add conflict detection for gateway proxy#2600
Merged
Conversation
Signed-off-by: Ashing Zheng <axingfly@gmail.com>
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR implements conflict detection for GatewayProxy resources to prevent multiple proxies from sharing the same admin credentials while targeting the same service or overlapping control-plane endpoints. This helps avoid configuration issues that could arise from credential conflicts between gateway proxy instances.
Key Changes:
- Added validation logic to detect and reject conflicting GatewayProxy configurations during create and update operations
- Enhanced the webhook validator with comprehensive conflict detection for both service-based and endpoint-based gateway proxy configurations
- Added comprehensive test coverage for various conflict scenarios including inline admin keys and secret-based admin keys
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| internal/webhook/v1/gatewayproxy_webhook.go | Implements core conflict detection logic with validation methods and configuration comparison utilities |
| internal/webhook/v1/gatewayproxy_webhook_test.go | Adds comprehensive unit tests covering service conflicts, endpoint overlaps, and admin key sharing scenarios |
| test/e2e/webhook/gatewayproxy.go | Adds end-to-end tests for webhook conflict detection with real resource creation and validation |
| internal/controller/indexer/tlsroute.go | Minor import reordering for consistency |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
AlinsRan
approved these changes
Oct 14, 2025
Revolyssup
approved these changes
Oct 14, 2025
AlinsRan
pushed a commit
to AlinsRan/apisix-ingress-controller
that referenced
this pull request
Oct 15, 2025
Signed-off-by: Ashing Zheng <axingfly@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Type of change:
What this PR does / why we need it:
add conflict detection for GatewayProxy resources that share the same admin credentials while targeting the same service or overlapping control-plane endpoints.
Pre-submission checklist: