Commit Graph

194 Commits (904b02075623d762c9a8f5580dfbb7c58f6dd743)

Author SHA1 Message Date
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
Clayton Coleman 545a5a865f List output with differing types should be more resilient
kubectl get can output a series of objects as a List in versioned
form, but not all API objects are available in the same schema.
Make the act of converting a []runtime.Object to api.List more
robust and add a test to verify its behavior in Get.

Makes it easier for client code to output unified objects.
2015-04-20 14:44:16 -04:00
Fabio Yeon 951a125751 Add "componentstatus" to API for easier cluster health check. 2015-04-17 11:58:23 -07:00
Eric Paris c75ecbd8e3 bash_completions: annotate kubectl get with resources which can be 'gotten'
A user types:
  kubectl get $resource

This will cause the bash completions to suggest the possible objects the
user can ask for.  The complete list right now is:

endpoints
event
limitrange
namespace
node
persistentvolume
persistentvolumeclaim
pod
replicationcontroller
resourcequota
secret
service
status

But this list should stay up2date as api objects are added or deleted
2015-04-13 19:11:26 -04:00
nikhiljindal fe60be3179 Moving v1beta1 kubectl examples to v1beta3 2015-04-08 13:08:13 -07:00
deads2k 6344cf3c3a refactor to move kubectl.cmd.Factory to kubect/cmd/util 2015-04-07 14:43:50 -04:00
nikhiljindal f2b72931fc Updating components to use v1beta3 2015-04-03 15:19:14 -07:00
Young 84bfda0587 remove cmd arg
related issue "Remove cmd from kubectl/cmd/factory arguments #4470"
2015-03-27 21:46:17 +08: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
Tamer Tas b39e31d8a3 Remove cmd from kubectl/cmd/factory 2015-03-18 14:23:14 +02:00
Jeff Lowdermilk a5746c9a0e Fix md generation for kubectl docs
Display usage string, not long help, as code, remove angle brackets from
output (.md interprets as tags and hides).
2015-03-11 16:42:40 -07:00
Jeff Lowdermilk cd7d78b696 Make kubectl commands return errors and centralize exit handling 2015-03-10 10:19:43 -07:00
Brendan Burns f505a33998 Differentiate between server error messages and client error messages in kubectl 2015-03-07 11:39:23 +01:00
Clayton Coleman b799e8cd3a Enumerate all versions when looking for an output conversion
Ensures that all objects can be printed, even if they don't
match output-version (because they are only implemented in
a newer API version).
2015-03-04 10:48:05 -05:00
Eric Paris d508395828 Change all cobra commands to use the example section
This will output the examples in their own section, rather than as part
of the 'long' synposis.
2015-02-20 16:41:31 -05:00
Salvatore Dario Minonne fda17c1b7a kubectl delete resource : remove all resources 2015-02-13 18:25:41 +01:00
MikeJeffrey ca1e9f8061 Comments go above the sample line in kubectl docs. 2015-02-12 15:49:25 -08:00
MikeJeffrey e5459c8802 Clean up kubectl help for auto-gen'd kubectl.md 2015-02-10 12:02:05 -08:00
Brendan Burns e7b11d09de Add some error checking to prevent obscure failures. 2015-02-10 06:32:26 -08:00
Jeff Lowdermilk d46ae5d841 Refactor kubectl/cmd helpers into pkg/kubectl/cmd/util
Allows helpers to be used by config commands.
2015-02-05 09:39:42 -08:00
deads2k dd01137138 add namespace to kubeconfig file 2015-01-20 16:07:54 -05:00
Andrew Seidl 6dee1d7fa4 Fix typos in user-facing strings 2015-01-18 01:32:34 -06:00
Brendan Burns 1ce6c27f3d Add an initial run command 2015-01-13 20:00:29 -08:00
Clayton Coleman 30743b8195 The get command should properly handle users providing invalid apiversions
Add more guards against bad behavior.  A follow up commit will ensure that
when the flags for api-version are specified, they default to the correct
values that client.SetKubernetesDefaults would use.
2015-01-13 18:51:55 -05:00
Clayton Coleman d1ab27762b Create should be able to accept multiple resources 2015-01-09 13:30:31 -05:00
Clayton Coleman 2151afe334 Allow kubectl get to fetch multiple resource types
Like Delete, which can now run over multiple types:

    kubectl delete pods,services -l name=foo

Get should be able to span items for label selection

    kubectl get pods,services -l name=foo
2015-01-09 13:30:14 -05:00
Clayton Coleman 8a4f225941 Make expandResourceShortcuts part of RESTMapper on client 2015-01-09 11:59:11 -05:00
Clayton Coleman a1ee782df5 Use resource package, delete older code 2015-01-09 11:59:11 -05:00
Mike Danese 39bdee387e kubectl get format is specified with -o, not -f 2014-11-21 17:55:48 -08:00
Tim Hockin ea960711ff Clean up error logs.
Use %v for errors, tidy some messages, make error messages start lowe-case
(as per go guidelines).  Just accumulated nits.
2014-11-21 09:45:26 +08:00
Clayton Coleman 487e5cd061 Make GetPrinter take the necessary conversion arguments
This fully encapsulates decisions about conversion within GetPrinter,
which prevents users from accidentally not converting.
2014-11-18 21:14:39 -05:00
Daniel Smith 01048540bf add --watch-only to kubectl, if you only want new messages 2014-11-13 17:02:36 -08:00
Daniel Smith 02a0593df0 Add --watch to get command 2014-11-12 13:44:39 -08:00
Daniel Smith a198a62064 refactor resource printer's version handling (to make adding --watch feature easier) 2014-11-11 16:15:22 -08:00
fabianofranz c43637b73c Extract several kubectl helpers from cmd/cmd.go 2014-11-10 15:09:32 -02:00
Daniel Smith 0b924ed9d9 Add events to kubectl (still need search function) 2014-11-05 13:59:32 -08:00
Clayton Coleman dbf28cbe51 Lock the output format version based on user input 2014-11-04 10:44:56 -05:00
Clayton Coleman a8ccb0f99f Display an external version of the object for --output
Use the version of the API the RESTMapper prefers (currently)
2014-11-04 10:44:56 -05:00
Clayton Coleman 70aa9cc62c Add --template and --templatefile options for more flexibility
Allow directly entered templates for scripting flexibility.
Changes --output=template to mean "string" and --output=templatefile
to mean "from file"
2014-11-04 10:44:56 -05:00
Clayton Coleman 09cfa364c5 Refactor Get and Describe to allow extension of types
Get should use ResourceMapper, allow Printer to be abstracted,
and extract Describe as *Describer types.
2014-11-04 10:44:56 -05:00
derekwaynecarr 5a7aced7b0 Kubectl namespace support
Add unit test for load namespace info
Different message on display of namespace versus setting namespace
2014-10-30 11:05:30 -04:00
derekwaynecarr bce1c12e01 Fix typo in kubectl 2014-10-21 15:30:43 -04:00
Sam Ghods a9a8c016f7 Add --no-headers to kubectl get 2014-10-15 19:05:36 -07:00
Sam Ghods 4b220f8b0a kubectl: kubecfg rewrite for better modularity and improved UX 2014-10-15 15:29:54 -07:00