Arshil-Khan opened a new pull request, #7:
URL: https://github.com/apache/casbin-informer-watcher/pull/7

   Summary
   
   This PR improves the Kubernetes informer-based watcher to handle Casbin 
policy changes from Kubernetes resources and propagate them through the 
configured watcher callback.
   
   Changes
   
   * Process Kubernetes informer add, update, and delete events as Casbin 
policy operations.
   * Support single and multiple policy rules from spec.policy and spec.rules 
resources.
   * Preserve the Casbin section (sec) and policy type (ptype) when translating 
Kubernetes resources into watcher messages.
   * Fall back to a full policy update when an event cannot be safely 
translated into an incremental operation.
   * Handle Kubernetes delete tombstones safely.
   * Wire OptionalUpdateCallback into watcher construction.
   * Serialize callback execution to avoid concurrent callback races.
   * Make watcher shutdown idempotent and concurrency-safe.
   * Add validation for invalid watcher configuration.
   * Expand test coverage for policy add/update/delete, batch policy changes, 
fallback reload behavior, callback handling, concurrency, and close behavior.
   
   Testing
   
   The following checks pass locally:
   
   * go test ./...
   * go test -race ./...
   * go vet ./...
   * git diff --check
   
   Related Issue
   
   Related to apache/casbin#1675.
   
   This implementation focuses on the informer/watcher side of Kubernetes CRD 
policy updates. Persistence and CRD storage concerns remain outside the scope 
of this change.


-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to