-
Notifications
You must be signed in to change notification settings - Fork 552
support fieldSelector for Informer #965
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Welcome @andekande! |
/lgtm Thanks for the PR (and special thanks for writing unit tests!) |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: andekande, brendandburns The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Thanks for the excellent first-contributor experience! |
In order to watch a resource list that is protected by a role on the resource name, we must be able to specify that name as fieldselector both in the request to watch (client-node.makeInformer()) and list (coreV1Api.listNamespaced[Resource]).
This is documented here: https://kubernetes.io/docs/reference/access-authn-authz/rbac/#referring-to-resources
An example is outlined explained in broader detail in the accompanying PR: kubernetes/website#29468
This is code to verify the desired state:
Currently this code produces:
When this role is in use: