bzp2010 opened a new pull request, #2884:
URL: https://github.com/apache/apisix-ingress-controller/pull/2884

   <!-- Please answer these questions before submitting a pull request -->
   
   ### Type of change:
   
   - [x] New feature provided
   - [x] Refactor
   
   ### What this PR does / why we need it:
   
   Part 2/6 of #2877. Stacked on #2883 (2a); only the last commit is new here.
   
   Replaces the single-blob, UUID-keyed `GlobalRuleItem` storage with a memdb 
row per plugin name (`GlobalRuleRow`, `PluginMetadataRow`), each carrying its 
own owner. Adds `SetGlobalRules`/`SetPluginMetadata` to write them, and extends 
`Lookup`/`OwnedEntities` (from 2a) to cover `global_rule`, `plugin_metadata`, 
and `route` (a route is attributed by its own labels, not its service's, since 
a traffic-split service can combine rules contributed by several different 
ApisixRoutes).
   
   `GetResourceLabel` is gone: `GlobalRuleRow` carries an owner directly 
instead of a label bag, so `status.go`'s `classifySyncResult` now attributes 
every resource type it can through `Lookup` instead. This is a real behavior 
improvement, not just internal refactor: previously a plugin failure on a 
GatewayProxy's global rule couldn't be told apart from another owner's, since 
they were merged into one untracked blob.
   
   Same-name global plugins across owners are undefined behavior by design: ADC 
only ever sees one flat `global_rules` map, so whichever write lands last wins. 
`SetGlobalRules` documents this explicitly.
   
   `provider.go` is untouched here; it still calls `Insert`/`Delete` exactly as 
before. Wiring it to attribute Gateway/IngressClass-sourced plugins to the 
right GatewayProxy is 2c.
   
   ### Pre-submission checklist:
   
   - [x] Did you explain what problem does this PR solve? Or what new features 
have been added?
   - [x] Have you added corresponding test cases?
   - [ ] Have you modified the corresponding document?
   - [x] Is this PR backward compatible?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to