authzed / spicedb-operator

Kubernetes controller for managing instances of SpiceDB
Apache License 2.0
62 stars 26 forks source link

Add watch-namespaces to spicedb-operator cmd #331

Closed sumedha-redd closed 1 month ago

sumedha-redd commented 1 month ago

https://github.com/authzed/spicedb-operator/issues/291#issuecomment-2209427392

Introduce --watch-namespaces argument to the spicedb-operator cmd, which accepts a comma-separated list of namespaces to watch. Update the controller to set up informers for each namespace. If the argument is not set, the operator continues to work at a cluster-wide level using NamespaceAll.

github-actions[bot] commented 1 month ago

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

sumedha-redd commented 1 month ago

I have read the CLA Document and I hereby sign the CLA

sumedha-redd commented 1 month ago

recheck

sumedha-redd commented 1 month ago

@ecordell Thanks for the feedback! Regarding adding a test for this — I looked into the e2e suite and tried updating the operator options here to set Options.WatchNamespaces with a random namespace name. This caused the tests to fail with errors while fetching resources, which seems like the expected behavior here. I'm not sure how to go about updating the cmd Options for the operator only for a specific test case though. Could you help with that?