WanLinghao
d4f5228b81
Add kubectl auth can-i --list
option which could help users know what actions they can do in specific namespace.
2019-01-19 15:58:44 +08:00
Maciej Szulik
885bed15da
Introduce -A as a shorthand for --all-namespaces in kubectl
2018-12-19 14:37:43 +01:00
Yang Li
141d33a2a5
Fix some golint errors for packages in pkg/kubectl/cmd
...
Co-authored-by: Arijit Basu <sayanarijit@gmail.com>
2018-11-22 22:09:08 +08:00
Maciej Szulik
21789b85a6
Move pkg/kubectl/cmd/templates -> pkg/kubectl/util/temlpates
2018-10-11 22:01:03 +02:00
Christoph Blecker
97b2992dc1
Update gofmt for go1.11
2018-10-05 12:59:38 -07:00
Maciej Szulik
5b55e1f8ed
Create cli-runtime staging repository
2018-08-21 17:08:30 +02:00
David Eads
7923a9fd99
snip links to internal clients
2018-08-02 14:53:22 -04:00
Kubernetes Submit Queue
fa20f87f1f
Merge pull request #59579 from fbac/kubectl-cani-exitcode
...
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>.
Add exit code 1 on not allowed to kubectl auth can-i
What this PR does / why we need it:
kubectl auth can-i verb resource always returns 0 status, even if the user can't <verb> <resource>
With this commit, kubectl will return exit code 1 when a verb is not allowed. It doesn't affect quiet option.
Release note:
```release-note
Fix kubectl auth can-i exit code. It will return 1 if the user is not allowed and 0 if it's allowed.
```
2018-06-05 07:01:06 -07:00
David Eads
c85e69aeb9
remove unnecessary factory delegation for RESTClientGetter method
2018-05-28 15:12:41 +02:00
David Eads
0db40da909
update factory interface to overlap with lower RESTClientGetter
2018-05-17 08:27:53 -04:00
Borja Aranda
9fa269a5e5
Fix kubectl auth can-i exit errcode
2018-05-11 16:41:21 +02:00
juanvallejo
5a34e4f594
remove printer helpers
2018-05-07 15:37:55 -04:00
David Eads
1cb797e355
acknowledge that creation of a restmapper can fail and that we cannot have a default
2018-05-01 07:52:51 -04:00
David Eads
5432ef5c45
divide statically known typer from dynamically derive restmapper
2018-04-27 11:15:05 -04:00
Di Xu
33b3fb9bed
flag value bindings for kubectl create/get/set commands
2018-02-27 11:00:55 +08:00
Di Xu
1c715d51c4
some code change
...
fix wrong required flags
disable the addition of [flags] to the usage, use customized useline
fix function rename
2017-12-25 16:23:38 +08:00
yuexiao-wang
142c2dd67b
Adjust the validating messages
...
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
2017-09-21 09:58:50 +08:00
Cao Shufeng
3bf3a031e8
This change add nonResourceURL to kubectl auth cani
2017-05-31 11:25:29 +08:00
Cao Shufeng
de3db1eec3
add subresource support to kube auth can-i
...
Eg:
kubectl auth can-i get pods --subresource=log
2017-05-02 12:08:20 +08:00
xilabao
d3d33aa834
remove warning infomation when use '*'
2017-04-18 16:10:21 +08:00
Kubernetes Submit Queue
d2733394ca
Merge pull request #42144 from xilabao/add-resource-validate
...
Automatic merge from submit-queue
add validate to resource in can-i
```
#kubectl auth can-i get xxx
the server doesn't have a resource type "xxx"
```
2017-04-13 11:43:05 -07:00
xilabao
53f2c2753f
add a warning to the resource check
2017-04-03 09:43:31 +08:00
Cao Shufeng
70a2643fdf
fix return value of "kubectl auth cani --quiet"
...
Before this change:
$ kubectl auth can-i get pod
no
$ kubectl auth can-i get pod --quiet
$ echo $?
0
After this change:
$ kubectl auth can-i get pod
no
$ kubectl auth can-i get pod --quiet
$ echo $?
1
2017-03-31 07:40:48 -04:00
xilabao
1833602bf8
add can-i example
2017-03-30 09:39:03 +08:00
deads2k
5b4a611fd7
add kubectl can-i to see if you can perform an action
2017-02-23 09:12:35 -05:00