Commit Graph

47 Commits (2d6c632de2f9ac15005c188913f779a81b392c81)

Author SHA1 Message Date
Michael Rubin 760b04e294 Use dedent for the kubectl commands
The one side effect is that for the "kubectl help" commands a newline
is prepended to output, which will alter the yaml output.

Here we use dedent to format the code to match the output.

hack/update-generated-docs.sh has been run and the affected files have
been added.

Note: for describe.go we added a period to the end of an output message.
2016-06-26 22:51:14 -07:00
Jan Chaloupka dd2c9c578d Introduce kubectl describe --show-events
Introduce DescriberSettings for Describer display options
Introduce --show-events flag and DescriberSettings in Describer methods
Introduce unit-tests
Regenerated kubectl describe docs
Add events flag tests to test-cmd.sh

Signed-off-by: dhodovsk@redhat.com
Signed-off-by: jchaloup@redhat.com
2016-05-06 11:40:11 +02:00
Dr. Stefan Schimanski 7e0bb885f1 Make kubectl bash completion namespace aware and add noun aliases
- add namespace filtering to bash completion
- add --namespace flag bash completion
- add bash completion noun aliases
- adapt to new cobra package structure
2016-04-03 16:25:56 +02:00
Brendan Burns be6c5b332b Add third party support to kubectl 2016-03-31 10:53:32 -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
Janet Kuo e93b855242 Update kubectl help for 1.2 resources 2016-03-22 14:14:35 -07:00
AdoHe 9cc668f7c6 update commented examples just remove $ 2016-02-29 09:41:09 -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
Jerzy Szczepkowski cac9e88c11 Updated kubectl help messages.
Updated kubectl help messages: added info about hpa. Fixes #17357.
2015-11-19 15:26:43 +01:00
feisky 3adb929eb9 Add kubectl describe for endpoints 2015-11-07 14:58:12 +08:00
eulerzgy f8f9afb874 alias local packagename for pkg/util/errors 2015-10-18 09:37:46 +08:00
Avesh Agarwal 6d6f338fac Adds servicesaccounts to kubectl get/describe cli help and docs. 2015-09-09 12:15:25 -04:00
deads2k f1b81ff678 bind filenames var instead of looking up 2015-09-01 08:35:57 -04:00
feihujiang 7291bde309 Kubectl annotate command accepts a filename param 2015-08-21 15:08:29 +08:00
Peeyush Agarwal 05e069d038 Use bash comments in kubectl examples
Comments in kubectl examples should use bash comments, not Go comments.
So, replaces // by # for example strings.
2015-08-12 19:56:23 +00:00
hurf 1d1f1fd97c Synchronize help message between describe and get
small nits, change 'resources' to 'resource types'
2015-08-12 15:27:11 +08:00
feihujiang 73b694e6c1 kubectl describe <kind> work with no arguments
Add describe_resource_assert to test describe <kind> with no object arg
2015-08-10 14:08:38 +08:00
feihjiang 2ca200f087 Kubectl describe command accepts a filename param 2015-08-07 16:28:51 +08:00
Mike Danese 8e33cbfa28 rewrite go imports 2015-08-05 17:30:03 -07:00
hurf 33fb6170f9 Use TYPE instead of RESOURCE in help string
For commands in kubectl, use TYPE in help string.
2015-08-05 16:34:48 +08:00
Mike Danese f3c4b7f7ac Merge pull request #12016 from hurf/shortcut
Better help message for get and describe
2015-07-31 13:53:02 -07:00
hurf 029ed15be5 Better help message for get and describe
Add tips for shortcut ns and ep.
2015-07-31 15:15:51 +08:00
feihujiang fc31543460 Output the same error when using kubectl describe for a nonexisting resource 2015-07-31 09:56:02 +08:00
hurf 4f9c486308 Fix hits in help strings of kubectl get command
Removed duplicated 'nodes (no)', added 'secret' for resource type.
Use actual long resource name to avoid confusion.
2015-07-15 09:43:51 +08:00
hurf 6dd8a1dfa4 Add a better help message for kubectl describe
When resource type isn't given in the command, print the possible
resource types. Also added the resource type description in help
strings.
2015-07-14 16:22:42 +08:00
Jeff Lowdermilk 229cbd472d Update kubectl describe help to document prefix matching behavior 2015-07-07 16:57:37 -07:00
Nikhil Jindal 09a57fadfb Merge pull request #10532 from feihujiang/outputErrorWhenUsingDescribeForNonexist
Output error when using kubectl describe for a nonexisting resource
2015-07-02 11:07:19 -07: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
feihujiang 55db7ec369 Output error when using kubectl describe for a nonexisting resource 2015-06-30 14:12:58 +08:00
hurf fa0efe3927 Add label support for kubectl describe
Add -l option to kubectl describe command, allow it return
multiple results filtered by label selector.
2015-06-12 15:08:28 +08:00
kargakis 6424a2bc63 resize: Enable resource type/name syntax
Also don't allow more than one objects in commands it makes sense
2015-05-21 17:39:01 +02: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
Brendan Burns 3a8a98c319 Augment describe to search for matching things if it doesn't match the original resource 2015-04-29 16:47:10 -07:00
Jeff Lowdermilk a8e2f6e9c8 Add examples for kubectl describe, and make gendocs less spammy
Makes hack/{run/verify}-gendocs.sh ignore generated-timestamp-only
changes so minor changes to kubectl don't have to touch the entire
set of md docs.
2015-04-23 14:53:10 -07:00
Eric Paris f272e836e0 Annotate kubectl describe with describable object for bash completions 2015-04-14 18:51:18 -04:00
kargakis a8987b661a describe: Support resource type/name syntax
This makes `kubectl describe` resource syntax consistent with `kubectl delete`
2015-04-08 16:03:22 +02:00
deads2k 6344cf3c3a refactor to move kubectl.cmd.Factory to kubect/cmd/util 2015-04-07 14:43:50 -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 35cc1b0c15 Mark old kubectl/resource.go methods as deprecated
Every command should use resource.Builder instead to have consistent
behavior.
2015-02-21 18:22:07 -05: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
Clayton Coleman d1ab27762b Create should be able to accept multiple resources 2015-01-09 13:30:31 -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
Sam Ghods 4b220f8b0a kubectl: kubecfg rewrite for better modularity and improved UX 2014-10-15 15:29:54 -07:00