mirror of
https://github.com/outbackdingo/kubernetes.git
synced 2026-02-12 22:10:34 +00:00
Automatic merge from submit-queue (batch tested with PRs 67026, 62945, 66917). 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>. `kubectl create {clusterrole,role}`'s `--resources` flag support asterisk to specify all resources **What this PR does / why we need it**: Currently `kubectl create (cluster)role`'s `--resources` flag does not support asterisk to specify all resources. ``` # kubectl create clusterrole superrole --verb=get --resource=* the server doesn't have a resource type "*" ``` As an user, we create a role with `--resources=*` sometimes, so this PR supports it. Fixes https://github.com/kubernetes/kubernetes/issues/62989 **Special notes for your reviewer**: - This patch does not support `--resource=*` for `SpecialVerbs` - e.g `kubectl create role foo --verb=impersonate --resource=*`, because current code also does not support `kubectl create role foo --verb=impersonate --resource=users,pods` **Release note**: ```release-note `kubectl create {clusterrole,role}`'s `--resources` flag supports asterisk to specify all resources. ```