Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow kubectl cmds to process files recursively, when given a dir #23116

Merged
merged 1 commit into from
Mar 30, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
36 changes: 36 additions & 0 deletions contrib/completions/bash/kubectl
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,8 @@ _kubectl_get()
flags+=("--output=")
two_word_flags+=("-o")
flags+=("--output-version=")
flags+=("--recursive")
flags+=("-R")
flags+=("--selector=")
two_word_flags+=("-l")
flags+=("--show-all")
Expand Down Expand Up @@ -358,6 +360,8 @@ _kubectl_describe()
two_word_flags+=("-f")
flags_with_completion+=("-f")
flags_completion+=("__handle_filename_extension_flag json|yaml|yml")
flags+=("--recursive")
flags+=("-R")
flags+=("--selector=")
two_word_flags+=("-l")
flags+=("--alsologtostderr")
Expand Down Expand Up @@ -756,6 +760,8 @@ _kubectl_create()
flags+=("--output=")
two_word_flags+=("-o")
flags+=("--record")
flags+=("--recursive")
flags+=("-R")
flags+=("--save-config")
flags+=("--schema-cache-dir=")
flags+=("--validate")
Expand Down Expand Up @@ -812,6 +818,8 @@ _kubectl_replace()
flags+=("--output=")
two_word_flags+=("-o")
flags+=("--record")
flags+=("--recursive")
flags+=("-R")
flags+=("--save-config")
flags+=("--schema-cache-dir=")
flags+=("--timeout=")
Expand Down Expand Up @@ -868,6 +876,8 @@ _kubectl_patch()
flags+=("--patch=")
two_word_flags+=("-p")
flags+=("--record")
flags+=("--recursive")
flags+=("-R")
flags+=("--type=")
flags+=("--alsologtostderr")
flags+=("--api-version=")
Expand Down Expand Up @@ -922,6 +932,8 @@ _kubectl_delete()
flags+=("--ignore-not-found")
flags+=("--output=")
two_word_flags+=("-o")
flags+=("--recursive")
flags+=("-R")
flags+=("--selector=")
two_word_flags+=("-l")
flags+=("--timeout=")
Expand Down Expand Up @@ -998,6 +1010,8 @@ _kubectl_edit()
two_word_flags+=("-o")
flags+=("--output-version=")
flags+=("--record")
flags+=("--recursive")
flags+=("-R")
flags+=("--save-config")
flags+=("--windows-line-endings")
flags+=("--alsologtostderr")
Expand Down Expand Up @@ -1048,6 +1062,8 @@ _kubectl_apply()
flags+=("--output=")
two_word_flags+=("-o")
flags+=("--record")
flags+=("--recursive")
flags+=("-R")
flags+=("--schema-cache-dir=")
flags+=("--validate")
flags+=("--alsologtostderr")
Expand Down Expand Up @@ -1259,6 +1275,8 @@ _kubectl_scale()
flags+=("--output=")
two_word_flags+=("-o")
flags+=("--record")
flags+=("--recursive")
flags+=("-R")
flags+=("--replicas=")
flags+=("--resource-version=")
flags+=("--timeout=")
Expand Down Expand Up @@ -1708,6 +1726,8 @@ _kubectl_expose()
flags+=("--port=")
flags+=("--protocol=")
flags+=("--record")
flags+=("--recursive")
flags+=("-R")
flags+=("--save-config")
flags+=("--selector=")
flags+=("--session-affinity=")
Expand Down Expand Up @@ -1775,6 +1795,8 @@ _kubectl_autoscale()
two_word_flags+=("-o")
flags+=("--output-version=")
flags+=("--record")
flags+=("--recursive")
flags+=("-R")
flags+=("--save-config")
flags+=("--show-all")
flags+=("-a")
Expand Down Expand Up @@ -1828,6 +1850,8 @@ _kubectl_rollout_history()
two_word_flags+=("-f")
flags_with_completion+=("-f")
flags_completion+=("__handle_filename_extension_flag json|yaml|yml")
flags+=("--recursive")
flags+=("-R")
flags+=("--revision=")
flags+=("--alsologtostderr")
flags+=("--api-version=")
Expand Down Expand Up @@ -1874,6 +1898,8 @@ _kubectl_rollout_pause()
two_word_flags+=("-f")
flags_with_completion+=("-f")
flags_completion+=("__handle_filename_extension_flag json|yaml|yml")
flags+=("--recursive")
flags+=("-R")
flags+=("--alsologtostderr")
flags+=("--api-version=")
flags+=("--certificate-authority=")
Expand Down Expand Up @@ -1919,6 +1945,8 @@ _kubectl_rollout_resume()
two_word_flags+=("-f")
flags_with_completion+=("-f")
flags_completion+=("__handle_filename_extension_flag json|yaml|yml")
flags+=("--recursive")
flags+=("-R")
flags+=("--alsologtostderr")
flags+=("--api-version=")
flags+=("--certificate-authority=")
Expand Down Expand Up @@ -1964,6 +1992,8 @@ _kubectl_rollout_undo()
two_word_flags+=("-f")
flags_with_completion+=("-f")
flags_completion+=("__handle_filename_extension_flag json|yaml|yml")
flags+=("--recursive")
flags+=("-R")
flags+=("--to-revision=")
flags+=("--alsologtostderr")
flags+=("--api-version=")
Expand Down Expand Up @@ -2061,6 +2091,8 @@ _kubectl_label()
flags+=("--output-version=")
flags+=("--overwrite")
flags+=("--record")
flags+=("--recursive")
flags+=("-R")
flags+=("--resource-version=")
flags+=("--selector=")
two_word_flags+=("-l")
Expand Down Expand Up @@ -2146,6 +2178,8 @@ _kubectl_annotate()
flags+=("--output-version=")
flags+=("--overwrite")
flags+=("--record")
flags+=("--recursive")
flags+=("-R")
flags+=("--resource-version=")
flags+=("--selector=")
two_word_flags+=("-l")
Expand Down Expand Up @@ -2738,6 +2772,8 @@ _kubectl_convert()
flags+=("--output=")
two_word_flags+=("-o")
flags+=("--output-version=")
flags+=("--recursive")
flags+=("-R")
flags+=("--schema-cache-dir=")
flags+=("--show-all")
flags+=("-a")
Expand Down
4 changes: 4 additions & 0 deletions docs/man/man1/kubectl-annotate.1
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ horizontalpodautoscalers (hpa), resourcequotas (quota) or secrets.
\fB\-\-record\fP=false
Record current kubectl command in the resource annotation.

.PP
\fB\-R\fP, \fB\-\-recursive\fP=false
If true, process directory recursively.

.PP
\fB\-\-resource\-version\fP=""
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.
Expand Down
4 changes: 4 additions & 0 deletions docs/man/man1/kubectl-apply.1
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ JSON and YAML formats are accepted.
\fB\-\-record\fP=false
Record current kubectl command in the resource annotation.

.PP
\fB\-R\fP, \fB\-\-recursive\fP=false
If true, process directory recursively.

.PP
\fB\-\-schema\-cache\-dir\fP="\~/.kube/schema"
If non\-empty, load/store cached API schemas in this directory, default is '$HOME/.kube/schema'
Expand Down
4 changes: 4 additions & 0 deletions docs/man/man1/kubectl-autoscale.1
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ An autoscaler can automatically increase or decrease number of pods deployed wit
\fB\-\-record\fP=false
Record current kubectl command in the resource annotation.

.PP
\fB\-R\fP, \fB\-\-recursive\fP=false
If true, process directory recursively.

.PP
\fB\-\-save\-config\fP=false
If true, the configuration of current object will be saved in its annotation. This is useful when you want to perform kubectl apply on this object in the future.
Expand Down
4 changes: 4 additions & 0 deletions docs/man/man1/kubectl-convert.1
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ to change to output destination.
\fB\-\-output\-version\fP=""
Output the formatted object with the given group version (for ex: 'extensions/v1beta1').

.PP
\fB\-R\fP, \fB\-\-recursive\fP=false
If true, process directory recursively.

.PP
\fB\-\-schema\-cache\-dir\fP="\~/.kube/schema"
If non\-empty, load/store cached API schemas in this directory, default is '$HOME/.kube/schema'
Expand Down
4 changes: 4 additions & 0 deletions docs/man/man1/kubectl-create.1
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ JSON and YAML formats are accepted.
\fB\-\-record\fP=false
Record current kubectl command in the resource annotation.

.PP
\fB\-R\fP, \fB\-\-recursive\fP=false
If true, process directory recursively.

.PP
\fB\-\-save\-config\fP=false
If true, the configuration of current object will be saved in its annotation. This is useful when you want to perform kubectl apply on this object in the future.
Expand Down
4 changes: 4 additions & 0 deletions docs/man/man1/kubectl-delete.1
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ will be lost along with the rest of the resource.
\fB\-o\fP, \fB\-\-output\fP=""
Output mode. Use "\-o name" for shorter output (resource/name).

.PP
\fB\-R\fP, \fB\-\-recursive\fP=false
If true, process directory recursively.

.PP
\fB\-l\fP, \fB\-\-selector\fP=""
Selector (label query) to filter on.
Expand Down
4 changes: 4 additions & 0 deletions docs/man/man1/kubectl-describe.1
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ componentstatuses (cs), endpoints (ep), and secrets.
\fB\-f\fP, \fB\-\-filename\fP=[]
Filename, directory, or URL to a file containing the resource to describe

.PP
\fB\-R\fP, \fB\-\-recursive\fP=false
If true, process directory recursively.

.PP
\fB\-l\fP, \fB\-\-selector\fP=""
Selector (label query) to filter on
Expand Down
4 changes: 4 additions & 0 deletions docs/man/man1/kubectl-edit.1
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ saved copy to include the latest resource version.
\fB\-\-record\fP=false
Record current kubectl command in the resource annotation.

.PP
\fB\-R\fP, \fB\-\-recursive\fP=false
If true, process directory recursively.

.PP
\fB\-\-save\-config\fP=false
If true, the configuration of current object will be saved in its annotation. This is useful when you want to perform kubectl apply on this object in the future.
Expand Down
4 changes: 4 additions & 0 deletions docs/man/man1/kubectl-expose.1
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@ labels are specified, the new service will re\-use the labels from the resource
\fB\-\-record\fP=false
Record current kubectl command in the resource annotation.

.PP
\fB\-R\fP, \fB\-\-recursive\fP=false
If true, process directory recursively.

.PP
\fB\-\-save\-config\fP=false
If true, the configuration of current object will be saved in its annotation. This is useful when you want to perform kubectl apply on this object in the future.
Expand Down
4 changes: 4 additions & 0 deletions docs/man/man1/kubectl-get.1
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ of the \-\-template flag, you can filter the attributes of the fetched resource(
\fB\-\-output\-version\fP=""
Output the formatted object with the given group version (for ex: 'extensions/v1beta1').

.PP
\fB\-R\fP, \fB\-\-recursive\fP=false
If true, process directory recursively.

.PP
\fB\-l\fP, \fB\-\-selector\fP=""
Selector (label query) to filter on
Expand Down
4 changes: 4 additions & 0 deletions docs/man/man1/kubectl-label.1
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ If \-\-resource\-version is specified, then updates will use this resource versi
\fB\-\-record\fP=false
Record current kubectl command in the resource annotation.

.PP
\fB\-R\fP, \fB\-\-recursive\fP=false
If true, process directory recursively.

.PP
\fB\-\-resource\-version\fP=""
If non\-empty, the labels update will only succeed if this is the current resource\-version for the object. Only valid when specifying a single resource.
Expand Down
4 changes: 4 additions & 0 deletions docs/man/man1/kubectl-patch.1
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ Please refer to the models in
\fB\-\-record\fP=false
Record current kubectl command in the resource annotation.

.PP
\fB\-R\fP, \fB\-\-recursive\fP=false
If true, process directory recursively.

.PP
\fB\-\-type\fP="strategic"
The type of patch being provided; one of [json merge strategic]
Expand Down
4 changes: 4 additions & 0 deletions docs/man/man1/kubectl-replace.1
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ Please refer to the models in
\fB\-\-record\fP=false
Record current kubectl command in the resource annotation.

.PP
\fB\-R\fP, \fB\-\-recursive\fP=false
If true, process directory recursively.

.PP
\fB\-\-save\-config\fP=false
If true, the configuration of current object will be saved in its annotation. This is useful when you want to perform kubectl apply on this object in the future.
Expand Down
4 changes: 4 additions & 0 deletions docs/man/man1/kubectl-rollout-history.1
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ View previous rollout revisions and configurations.
\fB\-f\fP, \fB\-\-filename\fP=[]
Filename, directory, or URL to a file identifying the resource to get from a server.

.PP
\fB\-R\fP, \fB\-\-recursive\fP=false
If true, process directory recursively.

.PP
\fB\-\-revision\fP=0
See the details, including podTemplate of the revision specified
Expand Down
4 changes: 4 additions & 0 deletions docs/man/man1/kubectl-rollout-pause.1
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ Currently only deployments support being paused.
\fB\-f\fP, \fB\-\-filename\fP=[]
Filename, directory, or URL to a file identifying the resource to get from a server.

.PP
\fB\-R\fP, \fB\-\-recursive\fP=false
If true, process directory recursively.


.SH OPTIONS INHERITED FROM PARENT COMMANDS
.PP
Expand Down
4 changes: 4 additions & 0 deletions docs/man/man1/kubectl-rollout-resume.1
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ Currently only deployments support being resumed.
\fB\-f\fP, \fB\-\-filename\fP=[]
Filename, directory, or URL to a file identifying the resource to get from a server.

.PP
\fB\-R\fP, \fB\-\-recursive\fP=false
If true, process directory recursively.


.SH OPTIONS INHERITED FROM PARENT COMMANDS
.PP
Expand Down
4 changes: 4 additions & 0 deletions docs/man/man1/kubectl-rollout-undo.1
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ Rollback to a previous rollout.
\fB\-f\fP, \fB\-\-filename\fP=[]
Filename, directory, or URL to a file identifying the resource to get from a server.

.PP
\fB\-R\fP, \fB\-\-recursive\fP=false
If true, process directory recursively.

.PP
\fB\-\-to\-revision\fP=0
The revision to rollback to. Default to 0 (last revision).
Expand Down
4 changes: 4 additions & 0 deletions docs/man/man1/kubectl-scale.1
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ scale is sent to the server.
\fB\-\-record\fP=false
Record current kubectl command in the resource annotation.

.PP
\fB\-R\fP, \fB\-\-recursive\fP=false
If true, process directory recursively.

.PP
\fB\-\-replicas\fP=\-1
The new desired number of replicas. Required.
Expand Down
4 changes: 4 additions & 0 deletions docs/man/man1/kubectl-stop.1
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ If the resource is scalable it will be scaled to 0 before deletion.
\fB\-o\fP, \fB\-\-output\fP=""
Output mode. Use "\-o name" for shorter output (resource/name).

.PP
\fB\-R\fP, \fB\-\-recursive\fP=false
If true, process directory recursively.

.PP
\fB\-l\fP, \fB\-\-selector\fP=""
Selector (label query) to filter on.
Expand Down
3 changes: 2 additions & 1 deletion docs/user-guide/kubectl/kubectl_annotate.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ kubectl annotate pods foo description-
--output-version="": Output the formatted object with the given group version (for ex: 'extensions/v1beta1').
--overwrite[=false]: If true, allow annotations to be overwritten, otherwise reject annotation updates that overwrite existing annotations.
--record[=false]: Record current kubectl command in the resource annotation.
-R, --recursive[=false]: If true, process directory recursively.
--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.
-l, --selector="": Selector (label query) to filter on
-a, --show-all[=false]: When printing, show all resources (default hide terminated pods.)
Expand Down Expand Up @@ -128,7 +129,7 @@ kubectl annotate pods foo description-

* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager

###### Auto generated by spf13/cobra on 2-Mar-2016
###### Auto generated by spf13/cobra on 28-Mar-2016

<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_annotate.md?pixel)]()
Expand Down