Commit Graph

75 Commits

Author SHA1 Message Date
juanvallejo
3484c6f676 add resource prefix to multiple items w/ same kind
This patch ensures that a resource prefix is added to multiple items of
the same kind, when using `oc get all`. Before, a prefix was added only
when a single item was returned on `oc get all`, but ignored if only a
single resource kind existed but multiple items for that kind were
returned.
2016-12-02 15:14:44 -05:00
Clayton Coleman
35a6bfbcee
generated: refactor 2016-11-23 22:30:47 -06:00
Kubernetes Submit Queue
9174429776 Merge pull request #33546 from k82cn/k8s_15834
Automatic merge from submit-queue

Updated err message when retrieving resources by name with --all-name…

fixes #15834
2016-10-15 06:50:00 -07:00
Ivan Shvedunov
f1258dca4e Fix typos 2016-10-15 00:21:00 +03:00
Klaus Ma
005b8dad14 Updated err message when retrieving resources by name with --all-namespaces. 2016-10-14 22:21:01 +08:00
Mike Danese
5f2569c16d allow kubectl -f to filter by selector 2016-09-30 00:42:35 -07:00
Kubernetes Submit Queue
4b700f41ec Merge pull request #32944 from k82cn/refactor_builder_visitorResult
Automatic merge from submit-queue

Refactor Builder.visitorResult by extra methonds.

**What this PR does / why we need it**:
Code polish; it'll make code readable.
2016-09-22 13:45:09 -07:00
Davanum Srinivas
e1373cf516 Extend all to more resources
Added more things from the list here:
https://github.com/kubernetes/kubernetes/blob/master/pkg/kubectl/cmd/cmd.go#L159

Update the devel/kubectl-conventions.md with the rules mentioned by
a few folks on which resources could be added to the special 'all' alias
2016-09-19 13:01:59 -04:00
Klaus Ma
d55006d38f Refactor Builder.visitorResult by extra methonds. 2016-09-17 17:36:13 +08:00
ymqytw
c67a62da49 Fixes #30562: Refactor kubectl command options to use common struct for common file params 2016-09-12 11:01:37 -07:00
Brendan Burns
155fb9f4be improve some error messages. 2016-08-29 22:27:22 -07:00
Kubernetes Submit Queue
5b5a4145da Merge pull request #30821 from ardnaxelarak/21076_change_isEmpty_to_Empty
Automatic merge from submit-queue

Rename IsEmpty to Empty

addresses #21076
2016-08-22 00:54:28 -07:00
Kara Alexandra
d12a66a422 Rename IsEmpty to Empty
Signed-off-by: Kara Alexandra <kalexandra@us.ibm.com>
2016-08-19 14:19:19 -07:00
Clayton Coleman
994e9e3c62
ResourceNames() should prohibit unnamed arguments
resource.Builder should prohibit empty resource names (the error is from
the wrong place) so that commands that work on multiple resources but
not resource types can properly limit errors.
2016-08-16 17:52:17 -04:00
Daniel Smith
b712bfd7ac Revert "Extend all to more resources" 2016-08-01 21:51:57 -07:00
Davanum Srinivas
ccf4e4d61e Extend all to more resources
Added more things from the list here:
https://github.com/kubernetes/kubernetes/blob/master/pkg/kubectl/cmd/cmd.go#L159

Update the devel/kubectl-conventions.md with the rules mentioned by
a few folks on which resources could be added to the special 'all' alias

Related to a suggestion in issue #22337
2016-07-24 21:14:50 -04:00
juanvallejo
17a4df2c31 update resource builder error message to be more clear 2016-07-07 16:32:26 -04:00
David McMahon
ef0c9f0c5b Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
k8s-merge-robot
42a5654383 Merge pull request #25612 from mbohlool/fix_error_msg
Automatic merge from submit-queue

Fixed misleading error message when a resource with no selector or na…

Commit:
- Fixed misleading error message when a resource with no selector or name is provided to kubectl delete or label command

This commit fixes #25541
2016-06-29 10:52:25 -07:00
Mike Metral
4409eed57f fix recursive & non-recursive kubectl get of generic output format 2016-06-02 21:46:15 -07:00
amehdy
0c5713084b Fixed misleading error message when a resource with no selector or name is provided to kubectl delete or label command 2016-05-14 02:04:35 -07:00
Phillip Wittrock
b9f9d130d7 Address PR comments 2 2016-05-09 16:23:15 -07:00
Mike Metral
7403878ac0 allow kubectl cmd to process dirs recursively
reqs:
    - the kubectl cmd must support the -f | --filename flag
    - the kubectl cmd must support visiting a dir one level deep,
    or using more than one resource
2016-03-28 12:44:21 -07:00
deads2k
5bd161a9cc allow resource.version.group in kubectl 2016-03-11 10:21:50 -05:00
Avesh Agarwal
ad6dfa0370 Fix kubectl create to create all resources in a url.
https://github.com/kubernetes/kubernetes/issues/18751 .
2016-03-02 18:08:24 -05:00
deads2k
9c42d219bc allow disambiguation of resouces 2016-02-25 07:35:23 -05:00
Clayton Coleman
2fd38a7dc0 Break kubectl from assuming details of codecs
Most of the logic related to type and kind retrieval belongs in the
codec, not in the various classes. Make it explicit that the codec
should handle these details.

Factory now returns a universal Decoder and a JSONEncoder to assist code
in kubectl that needs to specifically deal with JSON serialization
(apply, merge, patch, edit, jsonpath). Add comments to indicate the
serialization is explicit in those places. These methods decode to
internal and encode to the preferred API version as previous, although
in the future they may be changed.

React to removing Codec from version interfaces and RESTMapping by
passing it in to all the places that it is needed.
2016-01-22 13:27:26 -05:00
k8s-merge-robot
356487c951 Merge pull request #18101 from brendandburns/kubectl6
Auto commit by PR queue bot
2015-12-29 12:43:42 -08:00
Brendan Burns
4123a61df7 Add the client side bits of kubectl export 2015-12-22 10:41:59 -08:00
deads2k
20f9c2c545 find partial resource matches 2015-12-21 09:26:06 -05:00
k8s-merge-robot
649855128d Merge pull request #18627 from caesarxuchao/oneline-fix
Auto commit by PR queue bot
2015-12-19 00:50:31 -08:00
k8s-merge-robot
00c754108f Merge pull request #18165 from fabianofranz/fixes_get_show_all
Auto commit by PR queue bot
2015-12-18 20:01:20 -08:00
Abhishek Shah
6f63875165 Reverting 18442 2015-12-17 16:57:29 -08:00
Fabiano Franz
717896eae3 Fixes get --show-all 2015-12-17 18:35:54 -02:00
deads2k
41b78ad2b6 find partial resource matches 2015-12-16 10:19:31 -05:00
Chao Xu
5ba4f836f8 some small fix 2015-12-15 12:00:48 -08:00
deads2k
8679925847 update RESTMapping API to be properly typed 2015-11-25 14:02:37 -05:00
deads2k
5c4fb5bcbe make RESTMapper.KindFor 2015-11-25 14:02:37 -05:00
Fabiano Franz
d9161cb3b5 stdin is not a valid file extension for bash completions 2015-10-29 00:00:34 -02:00
Clayton Coleman
be868e934c Revert resource.Builder changes from 57388f9
57388f9f94
2015-10-21 16:23:33 -04:00
eulerzgy
f8f9afb874 alias local packagename for pkg/util/errors 2015-10-18 09:37:46 +08:00
Janet Kuo
57388f9f94 Support kubectl group/resource name 2015-10-06 13:12:32 -07:00
tummychow
78ce5da988 Move util.StringSet into its own package
A lot of packages use StringSet, but they don't use anything else from
the util package. Moving StringSet into another package will shrink
their dependency trees significantly.
2015-09-10 12:04:15 -07:00
Jeff Lowdermilk
cb65cfa746 Print recognized file extensions in resource builder error 2015-09-03 11:01:13 -07:00
kargakis
f3c63ba16b Support default types in the resource builder
Right now there is no method in the resource builder for specifying just the name of a resource. NameParam is useful when a default type is already specified with ResourceTypes.

Signed-off-by: kargakis <mkargaki@redhat.com>
2015-08-25 10:36:37 +03:00
Nikhil Jindal
e690f3b3e8 Merge pull request #12900 from feihujiang/deleteMultipleResourcesWithTheSameName
Allow delete multiple resources with the same name
2015-08-24 10:40:41 -07:00
feihujiang
943c57ff4e Allow delete multiple resources with the same name 2015-08-24 15:14:01 +08:00
feihujiang
29dc7f6ec2 Make a change to visitor to allow it to accept an error, like Go's path walker 2015-08-20 10:57:28 +08:00
feihujiang
4b9afc516e Kubectl label command accepts a filename param 2015-08-13 10:21:38 +08:00
Mike Danese
8e33cbfa28 rewrite go imports 2015-08-05 17:30:03 -07:00