Add -o name for commands which use printer to output results

Added a new printer which prints 'resource/name' pair of a given
object.
This commit is contained in:
hurf
2015-08-18 15:35:35 +08:00
parent 00e34429e0
commit d2d96ff6e1
20 changed files with 138 additions and 26 deletions

View File

@@ -85,7 +85,7 @@ $ kubectl annotate pods foo description-
-f, --filename=[]: Filename, directory, or URL to a file identifying the resource to update the annotation
-h, --help[=false]: help for annotate
--no-headers[=false]: When using the default output, don't print headers.
-o, --output="": Output format. One of: json|yaml|template|templatefile|wide|jsonpath.
-o, --output="": Output format. One of: json|yaml|template|templatefile|wide|jsonpath|name.
--output-version="": Output the formatted object with the given version (default api-version).
--overwrite[=false]: If true, allow annotations to be overwritten, otherwise reject annotation updates that overwrite existing annotations.
--resource-version="": If non-empty, the annotation update will only succeed if this is the current resource-version for the object. Only valid when specifying a single resource.
@@ -126,7 +126,7 @@ $ kubectl annotate pods foo description-
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
###### Auto generated by spf13/cobra at 2015-08-21 07:07:55.977091863 +0000 UTC
###### Auto generated by spf13/cobra at 2015-08-25 11:50:09.184436452 +0000 UTC
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_annotate.md?pixel)]()