-
Notifications
You must be signed in to change notification settings - Fork 2
feat: support custom gatewayproxy namespace for ingressclass #222
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
feat: support custom gatewayproxy namespace for ingressclass #222
Conversation
Signed-off-by: Ashing Zheng <[email protected]>
conformance test report - apisix modeapiVersion: gateway.networking.k8s.io/v1
date: "2025-08-04T08:35:25Z"
gatewayAPIChannel: standard
gatewayAPIVersion: v1.2.0
implementation:
contact: null
organization: APISIX
project: apisix-ingress-controller
url: https://github.com/apache/apisix-ingress-controller.git
version: v2.0.0
kind: ConformanceReport
mode: default
profiles:
- core:
failedTests:
- HTTPRouteInvalidBackendRefUnknownKind
- HTTPRouteMatchingAcrossRoutes
result: failure
skippedTests:
- HTTPRouteHTTPSListener
statistics:
Failed: 2
Passed: 30
Skipped: 1
name: GATEWAY-HTTP
summary: Core tests failed with 2 test failures. |
conformance test reportapiVersion: gateway.networking.k8s.io/v1
date: "2025-08-04T08:46:52Z"
gatewayAPIChannel: standard
gatewayAPIVersion: v1.2.0
implementation:
contact: null
organization: APISIX
project: apisix-ingress-controller
url: https://github.com/apache/apisix-ingress-controller.git
version: v2.0.0
kind: ConformanceReport
mode: default
profiles:
- core:
result: partial
skippedTests:
- HTTPRouteHTTPSListener
statistics:
Failed: 0
Passed: 32
Skipped: 1
name: GATEWAY-HTTP
summary: Core tests partially succeeded with 1 test skips. |
Signed-off-by: Ashing Zheng <[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 support for specifying a custom GatewayProxy namespace through IngressClass annotations, providing an alternative to the existing spec-based namespace configuration.
- Introduces a new annotation
apisix.apache.org/gatewayproxy-namespacefor IngressClass resources - Updates both v1 and v1beta1 IngressClass controllers to check for the annotation before falling back to spec-based namespace
- Adds comprehensive end-to-end tests to verify the new annotation functionality
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| internal/controller/utils.go | Defines the new annotation constant and updates parameter processing logic |
| internal/controller/ingressclass_controller.go | Adds annotation check for v1 IngressClass namespace resolution |
| internal/controller/ingressclass_v1beta1_controller.go | Adds annotation check for v1beta1 IngressClass namespace resolution |
| test/e2e/crds/v2/basic.go | Adds comprehensive e2e test for IngressClass annotation functionality |
| test/e2e/crds/v2/route.go | Removes debug logging statement |
Signed-off-by: Ashing Zheng <[email protected]>
conformance test report - apisix-standalone modeapiVersion: gateway.networking.k8s.io/v1
date: "2025-08-04T08:32:35Z"
gatewayAPIChannel: standard
gatewayAPIVersion: v1.2.0
implementation:
contact: null
organization: APISIX
project: apisix-ingress-controller
url: https://github.com/apache/apisix-ingress-controller.git
version: v2.0.0
kind: ConformanceReport
mode: default
profiles:
- core:
result: partial
skippedTests:
- HTTPRouteHTTPSListener
statistics:
Failed: 0
Passed: 32
Skipped: 1
name: GATEWAY-HTTP
summary: Core tests partially succeeded with 1 test skips. |
Signed-off-by: Ashing Zheng <[email protected]>
| By("update ApisixRoute") | ||
| applier.MustApplyAPIv2(types.NamespacedName{Namespace: s.Namespace(), Name: "default"}, &apisixRoute, fmt.Sprintf(apisixRouteSpec, "/headers")) | ||
| Eventually(request).WithArguments("/get").WithTimeout(8 * time.Second).ProbeEvery(time.Second).Should(Equal(http.StatusNotFound)) | ||
| s.RequestAssert(&scaffold.RequestAssert{ |
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.
RequestAssert has built-in retry logic.
For consistency, we recommend using either Eventually or RequestAssert within a single test case.
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.
ok, i copy it from another file. we can change it in the next PR.
Type of change:
What this PR does / why we need it:
ingressclass v1beta1 does not support directly specifying parameters.Namespace, so we support it through annotations.
Pre-submission checklist: