Commit Graph

53 Commits (667f5860835d34d3be65a57eb1011154d8287cca)

Author SHA1 Message Date
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
Mike Danese 4c52257be3 Merge pull request #11571 from kargakis/handle-aliases-in-comma-sep-args
Handle aliases in comma-separated args
2015-07-24 13:08:28 -07:00
Marcin Wielgus 866bd7b4e5 Dump stdin to a temporary file in kubectl replace --force 2015-07-23 15:22:23 +02:00
kargakis 4fcb4b7f8d Handle aliases in comma-separated args 2015-07-23 09:32:33 +02:00
Kris Rousey ffa764d60b Unify command line namespace resolution
This change allows the namespace in kubeconfig to be overridden by
specifying the namespace in the spec file. If namespace is explicitly
provided in the command line flags and the spec file has a different
namespace, this will cause an error.
2015-07-01 12:59:17 -07:00
Anastasis Andronidis 697e07f864 Correctly parse multiple resources from files
Refactored how files, directories and stdin are handled. Every file must pass
through the FileVisitor and then streamed through StreamVisitor. FileVisitor
takes care of opening/closing files and StreamVisitor is parsing multiple
resources.
2015-06-29 23:11:46 +02:00
Masahiro Sano 8ce64ec69e add --all-namespaces flag to request across all namespaces 2015-05-22 23:25:12 +09:00
Clayton Coleman a47716e66d Make ContinueOnError actually work
In resource.Builder ContinueOnError() should actually do so.

Reorganized util.CheckErr() to make it display bulk errors more
effectively and be more reusable. Clarified that CheckErr is not
specific to kubectl in Godoc. Changed the "Error: " prefix to
"error: " to more closely match Unix conventions.
2015-05-15 14:26:14 -04:00
Brendan Burns 7f11585972 Fix validation by moving it into the resource builder.
Also always print an error for unknown field.
2015-05-08 14:00:33 -07:00
Eric Paris 6b3a6e6b98 Make copyright ownership statement generic
Instead of saying "Google Inc." (which is not always correct) say "The
Kubernetes Authors", which is generic.
2015-05-01 17:49:56 -04:00
Mark Maglana 4927d70dd0 Add .yml to the list of recognized file extensions 2015-04-23 08:57:45 -07:00
Jordan Liggitt feb8ba9c4e Allow resource builder to avoid fetching objects 2015-04-20 15:00:52 -04:00
Clayton Coleman 4b85c0866a Don't insert duplicate arguments in SplitResourceArgs 2015-04-17 11:36:25 -04:00
Clayton Coleman 4833578a57 Merge pull request #6958 from smarterclayton/args_remain_in_order
`kubectl get rc,pods` should invoke in that order
2015-04-17 11:30:09 -04:00
kargakis 9d056c6bd8 Support setting up aliases for groups of resources
Closes #5278
2015-04-17 16:31:59 +02:00
Clayton Coleman 2c11835612 `kubectl get rc,pods` should invoke in that order
SplitResourceArguments should not use a golang map
2015-04-17 00:57:02 -04:00
Clayton Coleman 581d7cd789 Allow resource.Builder commands to take arguments by type/name
Will allow xarg behavior to fetch resources across multiple types.
Changes 'create', 'get', 'update', 'stop', and 'delete' to output
<resourceType>/<name>.
2015-03-25 20:39:22 -04:00
Salvatore Dario Minonne 75f2efb500 moving ParseSelector to Parse for labels only. 2015-03-05 22:39:36 +01:00
Karl Beecher ecbb91cc08 Adds support for multiple resources to kubectl
You can specify multiple resources by name when using the delete, get
and stop commands.
2015-02-20 16:18:57 +01:00
Salvatore Dario Minonne fda17c1b7a kubectl delete resource : remove all resources 2015-02-13 18:25:41 +01:00
derekwaynecarr 0851ca9522 Do not provide a namespace on request url if resource does not require it 2015-02-02 10:26:19 -05:00
derekwaynecarr a8449732e0 Make the FilterNamespace function the last visitor 2015-02-02 10:26:19 -05:00
Martin Nagy 9340781d21 Fix panic if selector uses malformed syntax 2015-01-14 17:13:58 +01:00