mirror of
https://github.com/kubernetes/sample-controller.git
synced 2025-02-01 01:12:52 +08:00
112f77b55e
Automatic merge from submit-queue (batch tested with PRs 55403, 54660, 55165). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. code-generator: add NewFilteredSharedInformerFactory function **What this PR does / why we need it**: Adds a `namespace` option to the SharedInformerFactory constructor. This is useful when building controllers that may need to scope themselves to a namespace due to RBAC constraints. Workarounds for this involve losing type safety if a user wants to use it for core APIs as well as a SharedInformerFactory type interface, as we have to deal with plain SharedIndexInformers (example here: https://github.com/jetstack-experimental/cert-manager/blob/master/pkg/util/kube/factory.go) **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes # Fixes https://github.com/kubernetes/code-generator/issues/9 **Special notes for your reviewer**: This will require updating all uses of SharedInformerFactory throughout the codebase. I'm going to follow up with later commits in this PR with these changes, but wanted to get this here to get some feedback on the way it's implemented. **Release note**: ```release-note NONE ``` /cc @sttts @nikhita @deads2k Kubernetes-commit: bab312dbcf2ea68c19bffa9f26362c86ef1987ec |
||
---|---|---|
.. | ||
Godeps.json | ||
Readme |
This directory tree is generated automatically by godep. Please do not edit. See https://github.com/tools/godep for more information.