• Kubernetes Submit Queue's avatar
    Merge pull request #63469 from wojtek-t/allow_list_and_watch_secrets · b3837d00
    Kubernetes Submit Queue authored
    Automatic merge from submit-queue. 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>.
    
    Allow for listing & watching individual secrets from nodes
    
    This PR:
    - propagates value of `metadata.name` field from fieldSelector to `name` field in RequestInfo (for list and watch requests)
    - authorizes list/watch for requests for single secrets/configmaps coming from nodes
    
    As an example:
    ```
    /api/v1/secrets/namespaces/ns?fieldSelector=metadata.name=foo =>
      requestInfo.Name = "foo",
      requestInfo.Verb = "list"
    /api/v1/secrets/namespaces/ns?fieldSelector=metadata.name=foo&watch=true =>
      requestInfo.Name = "foo",
      requestInfo.Verb = "list"
    ```
    
    ```release-note
    list/watch API requests with a fieldSelector that specifies `metadata.name` can now be authorized as requests for an individual named resource
    ```
    b3837d00
Name
Last commit
Last update
..
pkg Loading commit data...
BUILD Loading commit data...
OWNERS Loading commit data...