Commit Graph

75 Commits

Author SHA1 Message Date
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
Clayton Coleman
d24c5b145e Allow errors to be ignored by the builder 2015-01-09 13:31:24 -05:00
Clayton Coleman
d1ab27762b Create should be able to accept multiple resources 2015-01-09 13:30:31 -05:00
Clayton Coleman
d75a3d5021 Move Resource functionality to its own package
Create a unified Builder object for working with files, selectors,
types, and items that makes it easier to get multi-object functionality.

Supports all of the behaviors previously in resource.go, but with
additional flexibility to allow multi-type retrieval and access, directories,
URLs, nested objects, and lists.
2015-01-09 11:59:06 -05:00