-
Notifications
You must be signed in to change notification settings - Fork 1
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
base: release-v2-dev
Are you sure you want to change the base?
Conversation
conformance test reportapiVersion: gateway.networking.k8s.io/v1
date: "2025-06-13T08:28:23Z"
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. |
conformance test reportapiVersion: gateway.networking.k8s.io/v1
date: "2025-06-13T08:33:54Z"
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. |
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
Adds support for ApisixRoute reconciliation by unifying status updates, introducing new indexers, and expanding the v2 API types and CRD schemas.
- Switch all controllers to use
utils.NamespacedName
for status updates - Add ApisixRoute service/secret indexers and their helper functions
- Define new v2 API types for ApisixRoute (including
Exprs
conversion), status helper, shared constants, and update CRD schemas
Reviewed Changes
Copilot reviewed 37 out of 37 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
internal/controller/policies.go | Use utils.NamespacedName instead of local helper |
internal/controller/ingress_controller.go | Use utils.NamespacedName instead of local helper |
internal/controller/indexer/indexer.go | Add setupApisixRouteIndexer and index functions for routes |
internal/controller/httproutepolicy.go | Use utils.NamespacedName for HTTPRoutePolicy status updates |
internal/controller/httproute_controller.go | Use utils.NamespacedName for HTTPRoute status updates |
internal/controller/gatewayclass_congroller.go | Use utils.NamespacedName for GatewayClass updates |
internal/controller/gateway_controller.go | Use utils.NamespacedName for Gateway updates |
internal/controller/consumer_controller.go | Use utils.NamespacedName for Consumer status updates |
internal/controller/apisixglobalrule_controller.go | Update condition constants and use utils.NamespacedName |
docs/crd/api.md | Document new ApisixRouteHTTPMatchExprs and update links |
config/crd/bases/apisix.apache.org_apisixroutes.yaml | Remove now-optional fields from required lists |
config/crd/bases/apisix.apache.org_apisixpluginconfigs.yaml | Update the status field description |
api/v2/zz_generated.deepcopy.go | Regenerate DeepCopy methods for new Exprs type |
api/v2/status.go | Add GetStatus helper for v2 objects |
api/v2/shared_types.go | Introduce shared route and plugin constants |
api/v2/groupversion_info.go | Add Is(obj) helper for group-version checking |
api/v2/apisixroute_types.go | Add ApisixRouteHTTPMatchExprs type and ToVars converter |
api/v2/apisixpluginconfig_types.go | Change ApisixPluginConfigStatus to alias ApisixStatus |
api/v2/apisixglobalrule_types.go | Remove redundant deepcopy file and tweak init registration |
Comments suppressed due to low confidence (3)
internal/controller/gatewayclass_congroller.go:1
- The filename contains a typo (
congroller
). Rename togatewayclass_controller.go
for consistency and clarity.
gatewayclass_congroller.go
api/v2/apisixroute_types.go:234
- The new
ToVars
conversion function contains complex logic for multiple operators and scopes. Consider adding unit tests to cover each branch and error condition.
func (exprs ApisixRouteHTTPMatchExprs) ToVars() (result adc.Vars, err error) {
config/crd/bases/apisix.apache.org_apisixpluginconfigs.yaml:77
- [nitpick] The status description no longer references
ApisixPluginConfigStatus
. Consider updating it to mention plugin config or align it with the alias for clarity.
description: ApisixStatus is the status report for Apisix ingress Resources
Type of change:
What this PR does / why we need it:
实现 ApisixRoute Reconciler
Pre-submission checklist: