Skip to content

Conversation

@ronething
Copy link
Contributor

@ronething ronething commented Aug 4, 2025

Type of change:

  • Bugfix
  • New feature provided
  • Improve performance
  • Backport patches
  • Documentation
  • Refactor
  • Chore
  • CI/CD or Tests

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:

  • Did you explain what problem does this PR solve? Or what new features have been added?
  • Have you added corresponding test cases?
  • Have you modified the corresponding document?
  • Is this PR backward compatible? If it is not backward compatible, please discuss on the mailing list first

@github-actions
Copy link
Contributor

github-actions bot commented Aug 4, 2025

conformance test report - apisix mode

apiVersion: 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.

@github-actions
Copy link
Contributor

github-actions bot commented Aug 4, 2025

conformance test report

apiVersion: 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]>
@ronething ronething requested a review from Copilot August 4, 2025 08:02
Copy link
Contributor

Copilot AI left a 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-namespace for 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]>
@github-actions
Copy link
Contributor

github-actions bot commented Aug 4, 2025

conformance test report - apisix-standalone mode

apiVersion: 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{
Copy link
Contributor

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.

Copy link
Contributor Author

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.

@ronething ronething merged commit 7be81e9 into release-v2-dev Aug 4, 2025
21 of 22 checks passed
@ronething ronething deleted the feat/support_ingressclassv1beta1_annotations branch August 4, 2025 09:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants