Merge pull request #29468 from Abirdcfly/patch-2

Update rbac.md: Describe in detail how to specify resourceNames when using list verbs
This commit is contained in:
Kubernetes Prow Robot
2021-08-23 07:12:01 -07:00
committed by GitHub
@@ -279,8 +279,10 @@ rules:
```
{{< note >}}
You cannot restrict `create` or `deletecollection` requests by resourceName. For `create`, this
limitation is because the object name is not known at authorization time.
You cannot restrict `create` or `deletecollection` requests by their resource name.
For `create`, this limitation is because the name of the new object may not be known at authorization time.
If you restrict `list` or `watch` by resourceName, clients must include a `metadata.name` field selector in their `list` or `watch` request that matches the specified resourceName in order to be authorized.
For example, `kubectl get configmaps --field-selector=metadata.name=my-configmap`
{{< /note >}}