You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@casbin.apache.org by "Arshil-Khan (via GitHub)" <gi...@apache.org> on 2026/09/07 14:27:47 UTC

[PR] feat: improve Kubernetes informer watcher [casbin-informer-watcher]

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: commits-unsubscribe@casbin.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@casbin.apache.org
For additional commands, e-mail: commits-help@casbin.apache.org


Re: [PR] feat: improve Kubernetes informer watcher [casbin-informer-watcher]

Posted by "hsluoyz (via GitHub)" <gi...@apache.org>.
hsluoyz closed pull request #7: feat: improve Kubernetes informer watcher
URL: https://github.com/apache/casbin-informer-watcher/pull/7


-- 
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: commits-unsubscribe@casbin.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@casbin.apache.org
For additional commands, e-mail: commits-help@casbin.apache.org


Re: [PR] feat: improve Kubernetes informer watcher [casbin-informer-watcher]

Posted by "hsluoyz (via GitHub)" <gi...@apache.org>.
hsluoyz commented on PR #7:
URL: https://github.com/apache/casbin-informer-watcher/pull/7#issuecomment-5611239266

   replaced by: https://github.com/apache/casbin-informer-watcher/commit/0e911cfad7396bc2f285a83b0f5213d967a97f7c


-- 
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: commits-unsubscribe@casbin.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@casbin.apache.org
For additional commands, e-mail: commits-help@casbin.apache.org


Re: [PR] feat: improve Kubernetes informer watcher [casbin-informer-watcher]

Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #7:
URL: https://github.com/apache/casbin-informer-watcher/pull/7#issuecomment-5606610637

   ## Welcome to [Codecov](https://codecov.io?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) :tada:
   
   Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.
   
   Thanks for integrating Codecov - We've got you covered :open_umbrella:


-- 
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: commits-unsubscribe@casbin.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@casbin.apache.org
For additional commands, e-mail: commits-help@casbin.apache.org