Skip to content

feat: implement reconciler for apisixroute #164

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

Merged
merged 13 commits into from
Jun 16, 2025
Merged

Conversation

dspo
Copy link
Contributor

@dspo dspo commented Jun 12, 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:

实现 ApisixRoute Reconciler

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

@dspo dspo closed this Jun 13, 2025
@dspo dspo reopened this Jun 13, 2025
@dspo dspo marked this pull request as ready for review June 13, 2025 07:02
Copy link

github-actions bot commented Jun 13, 2025

conformance test report

apiVersion: gateway.networking.k8s.io/v1
date: "2025-06-16T07:34:48Z"
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
    result: failure
    skippedTests:
    - HTTPRouteHTTPSListener
    statistics:
      Failed: 1
      Passed: 31
      Skipped: 1
  name: GATEWAY-HTTP
  summary: Core tests failed with 1 test failures.

Copy link

github-actions bot commented Jun 13, 2025

conformance test report

apiVersion: gateway.networking.k8s.io/v1
date: "2025-06-16T07:36:58Z"
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.

@dspo dspo requested a review from Copilot June 13, 2025 07:57
@dspo dspo changed the title (WIP)feat: implement reconciler for apisixroute feat: implement reconciler for apisixroute Jun 13, 2025
Copilot

This comment was marked as outdated.

@dspo dspo requested a review from ronething June 13, 2025 08:16
@dspo dspo requested a review from Copilot June 16, 2025 00:53
Copy link
Contributor

@Copilot 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 introduces a new feature that implements the ApisixRoute reconciler along with several supporting changes. Key changes include the addition of a new SetApisixRouteConditionAccepted function, updates to the indexing functions for ApisixRoute resources, and systematic replacement of local NamespacedName calls with a centralized utility.

Reviewed Changes

Copilot reviewed 36 out of 36 changed files in this pull request and generated 1 comment.

File Description
internal/controller/utils.go Added new constants and SetApisixRouteConditionAccepted function
internal/controller/* Updated NamespacedName usages to use utils.NamespacedName
internal/controller/indexer/indexer.go Added setupApisixRouteIndexer and associated index functions
docs/crd/api.md; config/crd/bases/.yaml; api/v2/ Updated CRDs and API types to support APISIX v2 and new operator syntaxes
Comments suppressed due to low confidence (2)

config/crd/bases/apisix.apache.org_apisixroutes.yaml:132

  • The removal of the 'weight' field from the required fields in the service spec may be a breaking change for users relying on it. Please confirm that this change is intended and document the impact accordingly.
-                        - weight

api/v2/reason.go:1

  • The removal of the entire api/v2/reason.go file could potentially affect references elsewhere if still in use. Please verify that this removal is intentional and that no dependencies rely on it.
// Licensed under the Apache License...

Comment on lines 152 to 160
if !plugin.Enable {
continue
}
if plugin.Config == nil {
continue
}
if plugin.SecretRef == "" {
continue
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Merge into OR condition?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed.

Copy link
Contributor

@ronething ronething left a comment

Choose a reason for hiding this comment

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

lgtm

@dspo dspo merged commit 6e87cc6 into release-v2-dev Jun 16, 2025
12 of 13 checks passed
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.

2 participants