Merge pull request #24223 from tyangliu/generate-yaml-docs

Include genyaml in update/verify generated docs scripts
This commit is contained in:
Daniel Smith 2016-04-14 16:22:03 -07:00
commit f778cb3bc7
26 changed files with 219 additions and 33 deletions

View File

@ -106,3 +106,36 @@ docs/user-guide/kubectl/kubectl_run.md
docs/user-guide/kubectl/kubectl_scale.md docs/user-guide/kubectl/kubectl_scale.md
docs/user-guide/kubectl/kubectl_uncordon.md docs/user-guide/kubectl/kubectl_uncordon.md
docs/user-guide/kubectl/kubectl_version.md docs/user-guide/kubectl/kubectl_version.md
docs/yaml/kubectl/kubectl.yaml
docs/yaml/kubectl/kubectl_annotate.yaml
docs/yaml/kubectl/kubectl_api-versions.yaml
docs/yaml/kubectl/kubectl_apply.yaml
docs/yaml/kubectl/kubectl_attach.yaml
docs/yaml/kubectl/kubectl_autoscale.yaml
docs/yaml/kubectl/kubectl_cluster-info.yaml
docs/yaml/kubectl/kubectl_config.yaml
docs/yaml/kubectl/kubectl_convert.yaml
docs/yaml/kubectl/kubectl_cordon.yaml
docs/yaml/kubectl/kubectl_create.yaml
docs/yaml/kubectl/kubectl_delete.yaml
docs/yaml/kubectl/kubectl_describe.yaml
docs/yaml/kubectl/kubectl_drain.yaml
docs/yaml/kubectl/kubectl_edit.yaml
docs/yaml/kubectl/kubectl_exec.yaml
docs/yaml/kubectl/kubectl_explain.yaml
docs/yaml/kubectl/kubectl_expose.yaml
docs/yaml/kubectl/kubectl_get.yaml
docs/yaml/kubectl/kubectl_label.yaml
docs/yaml/kubectl/kubectl_logs.yaml
docs/yaml/kubectl/kubectl_namespace.yaml
docs/yaml/kubectl/kubectl_patch.yaml
docs/yaml/kubectl/kubectl_port-forward.yaml
docs/yaml/kubectl/kubectl_proxy.yaml
docs/yaml/kubectl/kubectl_replace.yaml
docs/yaml/kubectl/kubectl_rolling-update.yaml
docs/yaml/kubectl/kubectl_rollout.yaml
docs/yaml/kubectl/kubectl_run.yaml
docs/yaml/kubectl/kubectl_scale.yaml
docs/yaml/kubectl/kubectl_stop.yaml
docs/yaml/kubectl/kubectl_uncordon.yaml
docs/yaml/kubectl/kubectl_version.yaml

View File

@ -22,6 +22,10 @@ options:
default_value: '[]' default_value: '[]'
usage: | usage: |
Filename, directory, or URL to a file identifying the resource to update the annotation Filename, directory, or URL to a file identifying the resource to update the annotation
- name: include-extended-apis
default_value: "true"
usage: |
If true, include definitions of new APIs via calls to the API server. [default true]
- name: no-headers - name: no-headers
default_value: "false" default_value: "false"
usage: When using the default output, don't print headers. usage: When using the default output, don't print headers.
@ -39,6 +43,10 @@ options:
- name: record - name: record
default_value: "false" default_value: "false"
usage: Record current kubectl command in the resource annotation. usage: Record current kubectl command in the resource annotation.
- name: recursive
shorthand: R
default_value: "false"
usage: If true, process directory recursively.
- name: resource-version - name: resource-version
usage: | usage: |
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. 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.

View File

@ -8,6 +8,10 @@ options:
default_value: '[]' default_value: '[]'
usage: | usage: |
Filename, directory, or URL to file that contains the configuration to apply Filename, directory, or URL to file that contains the configuration to apply
- name: include-extended-apis
default_value: "true"
usage: |
If true, include definitions of new APIs via calls to the API server. [default true]
- name: output - name: output
shorthand: o shorthand: o
usage: | usage: |
@ -15,6 +19,10 @@ options:
- name: record - name: record
default_value: "false" default_value: "false"
usage: Record current kubectl command in the resource annotation. usage: Record current kubectl command in the resource annotation.
- name: recursive
shorthand: R
default_value: "false"
usage: If true, process directory recursively.
- name: schema-cache-dir - name: schema-cache-dir
default_value: ~/.kube/schema default_value: ~/.kube/schema
usage: | usage: |

View File

@ -24,6 +24,10 @@ options:
default_value: horizontalpodautoscaler/v1beta1 default_value: horizontalpodautoscaler/v1beta1
usage: | usage: |
The name of the API generator to use. Currently there is only 1 generator. The name of the API generator to use. Currently there is only 1 generator.
- name: include-extended-apis
default_value: "true"
usage: |
If true, include definitions of new APIs via calls to the API server. [default true]
- name: max - name: max
default_value: "-1" default_value: "-1"
usage: | usage: |
@ -48,6 +52,10 @@ options:
- name: record - name: record
default_value: "false" default_value: "false"
usage: Record current kubectl command in the resource annotation. usage: Record current kubectl command in the resource annotation.
- name: recursive
shorthand: R
default_value: "false"
usage: If true, process directory recursively.
- name: save-config - name: save-config
default_value: "false" default_value: "false"
usage: | usage: |

View File

@ -2,6 +2,11 @@ name: cluster-info
synopsis: Display cluster info synopsis: Display cluster info
description: | description: |
Display addresses of the master and services with label kubernetes.io/cluster-service=true Display addresses of the master and services with label kubernetes.io/cluster-service=true
options:
- name: include-extended-apis
default_value: "true"
usage: |
If true, include definitions of new APIs via calls to the API server. [default true]
inherited_options: inherited_options:
- name: alsologtostderr - name: alsologtostderr
default_value: "false" default_value: "false"

View File

@ -16,6 +16,10 @@ options:
default_value: '[]' default_value: '[]'
usage: | usage: |
Filename, directory, or URL to file to need to get converted. Filename, directory, or URL to file to need to get converted.
- name: include-extended-apis
default_value: "true"
usage: |
If true, include definitions of new APIs via calls to the API server. [default true]
- name: local - name: local
default_value: "true" default_value: "true"
usage: | usage: |
@ -30,6 +34,10 @@ options:
- name: output-version - name: output-version
usage: | usage: |
Output the formatted object with the given group version (for ex: 'extensions/v1beta1'). Output the formatted object with the given group version (for ex: 'extensions/v1beta1').
- name: recursive
shorthand: R
default_value: "false"
usage: If true, process directory recursively.
- name: schema-cache-dir - name: schema-cache-dir
default_value: ~/.kube/schema default_value: ~/.kube/schema
usage: | usage: |

View File

@ -10,6 +10,10 @@ options:
default_value: '[]' default_value: '[]'
usage: | usage: |
Filename, directory, or URL to file to use to create the resource Filename, directory, or URL to file to use to create the resource
- name: include-extended-apis
default_value: "true"
usage: |
If true, include definitions of new APIs via calls to the API server. [default true]
- name: output - name: output
shorthand: o shorthand: o
usage: | usage: |
@ -17,6 +21,10 @@ options:
- name: record - name: record
default_value: "false" default_value: "false"
usage: Record current kubectl command in the resource annotation. usage: Record current kubectl command in the resource annotation.
- name: recursive
shorthand: R
default_value: "false"
usage: If true, process directory recursively.
- name: save-config - name: save-config
default_value: "false" default_value: "false"
usage: | usage: |

View File

@ -32,10 +32,18 @@ options:
default_value: "false" default_value: "false"
usage: | usage: |
Treat "resource not found" as a successful delete. Defaults to "true" when --all is specified. Treat "resource not found" as a successful delete. Defaults to "true" when --all is specified.
- name: include-extended-apis
default_value: "true"
usage: |
If true, include definitions of new APIs via calls to the API server. [default true]
- name: output - name: output
shorthand: o shorthand: o
usage: | usage: |
Output mode. Use "-o name" for shorter output (resource/name). Output mode. Use "-o name" for shorter output (resource/name).
- name: recursive
shorthand: R
default_value: "false"
usage: If true, process directory recursively.
- name: selector - name: selector
shorthand: l shorthand: l
usage: Selector (label query) to filter on. usage: Selector (label query) to filter on.

View File

@ -14,7 +14,7 @@ description: |-
Possible resource types include (case insensitive): pods (po), services (svc), deployments, Possible resource types include (case insensitive): pods (po), services (svc), deployments,
replicasets (rs), replicationcontrollers (rc), nodes (no), events (ev), limitranges (limits), replicasets (rs), replicationcontrollers (rc), nodes (no), events (ev), limitranges (limits),
persistentvolumes (pv), persistentvolumeclaims (pvc), resourcequotas (quota), namespaces (ns), persistentvolumes (pv), persistentvolumeclaims (pvc), resourcequotas (quota), namespaces (ns),
serviceaccounts, ingresses (ing), horizontalpodautoscalers (hpa), daemonsets (ds), configmaps, serviceaccounts (sa), ingresses (ing), horizontalpodautoscalers (hpa), daemonsets (ds), configmaps,
componentstatuses (cs), endpoints (ep), and secrets. componentstatuses (cs), endpoints (ep), and secrets.
options: options:
- name: filename - name: filename
@ -22,6 +22,14 @@ options:
default_value: '[]' default_value: '[]'
usage: | usage: |
Filename, directory, or URL to a file containing the resource to describe Filename, directory, or URL to a file containing the resource to describe
- name: include-extended-apis
default_value: "true"
usage: |
If true, include definitions of new APIs via calls to the API server. [default true]
- name: recursive
shorthand: R
default_value: "false"
usage: If true, process directory recursively.
- name: selector - name: selector
shorthand: l shorthand: l
usage: Selector (label query) to filter on usage: Selector (label query) to filter on

View File

@ -26,6 +26,10 @@ options:
default_value: '[]' default_value: '[]'
usage: | usage: |
Filename, directory, or URL to file to use to edit the resource Filename, directory, or URL to file to use to edit the resource
- name: include-extended-apis
default_value: "true"
usage: |
If true, include definitions of new APIs via calls to the API server. [default true]
- name: output - name: output
shorthand: o shorthand: o
default_value: yaml default_value: yaml
@ -36,6 +40,10 @@ options:
- name: record - name: record
default_value: "false" default_value: "false"
usage: Record current kubectl command in the resource annotation. usage: Record current kubectl command in the resource annotation.
- name: recursive
shorthand: R
default_value: "false"
usage: If true, process directory recursively.
- name: save-config - name: save-config
default_value: "false" default_value: "false"
usage: | usage: |

View File

@ -6,9 +6,13 @@ description: |-
Possible resource types include (case insensitive): pods (po), services (svc), deployments, Possible resource types include (case insensitive): pods (po), services (svc), deployments,
replicasets (rs), replicationcontrollers (rc), nodes (no), events (ev), limitranges (limits), replicasets (rs), replicationcontrollers (rc), nodes (no), events (ev), limitranges (limits),
persistentvolumes (pv), persistentvolumeclaims (pvc), resourcequotas (quota), namespaces (ns), persistentvolumes (pv), persistentvolumeclaims (pvc), resourcequotas (quota), namespaces (ns),
serviceaccounts, ingresses (ing), horizontalpodautoscalers (hpa), daemonsets (ds), configmaps, serviceaccounts (sa), ingresses (ing), horizontalpodautoscalers (hpa), daemonsets (ds), configmaps,
componentstatuses (cs), endpoints (ep), and secrets. componentstatuses (cs), endpoints (ep), and secrets.
options: options:
- name: include-extended-apis
default_value: "true"
usage: |
If true, include definitions of new APIs via calls to the API server. [default true]
- name: recursive - name: recursive
default_value: "false" default_value: "false"
usage: Print the fields of fields (Currently only 1 level deep) usage: Print the fields of fields (Currently only 1 level deep)

View File

@ -1,6 +1,6 @@
name: expose name: expose
synopsis: | synopsis: |
Take a replication controller, service, or pod and expose it as a new Kubernetes Service Take a replication controller, service, deployment or pod and expose it as a new Kubernetes Service
description: "Take a deployment, service, replica set, replication controller, or description: "Take a deployment, service, replica set, replication controller, or
pod and expose it as a new Kubernetes service.\n\nLooks up a deployment, service, pod and expose it as a new Kubernetes service.\n\nLooks up a deployment, service,
replica set, replication controller or pod by name and uses the selector\nfor that replica set, replication controller or pod by name and uses the selector\nfor that
@ -64,6 +64,10 @@ options:
- name: record - name: record
default_value: "false" default_value: "false"
usage: Record current kubectl command in the resource annotation. usage: Record current kubectl command in the resource annotation.
- name: recursive
shorthand: R
default_value: "false"
usage: If true, process directory recursively.
- name: save-config - name: save-config
default_value: "false" default_value: "false"
usage: | usage: |

View File

@ -6,7 +6,7 @@ description: |-
Possible resource types include (case insensitive): pods (po), services (svc), deployments, Possible resource types include (case insensitive): pods (po), services (svc), deployments,
replicasets (rs), replicationcontrollers (rc), nodes (no), events (ev), limitranges (limits), replicasets (rs), replicationcontrollers (rc), nodes (no), events (ev), limitranges (limits),
persistentvolumes (pv), persistentvolumeclaims (pvc), resourcequotas (quota), namespaces (ns), persistentvolumes (pv), persistentvolumeclaims (pvc), resourcequotas (quota), namespaces (ns),
serviceaccounts, ingresses (ing), horizontalpodautoscalers (hpa), daemonsets (ds), configmaps, serviceaccounts (sa), ingresses (ing), horizontalpodautoscalers (hpa), daemonsets (ds), configmaps,
componentstatuses (cs), endpoints (ep), and secrets. componentstatuses (cs), endpoints (ep), and secrets.
By specifying the output as 'template' and providing a Go template as the value By specifying the output as 'template' and providing a Go template as the value
@ -25,6 +25,10 @@ options:
default_value: '[]' default_value: '[]'
usage: | usage: |
Filename, directory, or URL to a file identifying the resource to get from a server. Filename, directory, or URL to a file identifying the resource to get from a server.
- name: include-extended-apis
default_value: "true"
usage: |
If true, include definitions of new APIs via calls to the API server. [default true]
- name: label-columns - name: label-columns
shorthand: L shorthand: L
default_value: '[]' default_value: '[]'
@ -40,6 +44,10 @@ options:
- name: output-version - name: output-version
usage: | usage: |
Output the formatted object with the given group version (for ex: 'extensions/v1beta1'). Output the formatted object with the given group version (for ex: 'extensions/v1beta1').
- name: recursive
shorthand: R
default_value: "false"
usage: If true, process directory recursively.
- name: selector - name: selector
shorthand: l shorthand: l
usage: Selector (label query) to filter on usage: Selector (label query) to filter on

View File

@ -20,6 +20,10 @@ options:
default_value: '[]' default_value: '[]'
usage: | usage: |
Filename, directory, or URL to a file identifying the resource to update the labels Filename, directory, or URL to a file identifying the resource to update the labels
- name: include-extended-apis
default_value: "true"
usage: |
If true, include definitions of new APIs via calls to the API server. [default true]
- name: no-headers - name: no-headers
default_value: "false" default_value: "false"
usage: When using the default output, don't print headers. usage: When using the default output, don't print headers.
@ -37,6 +41,10 @@ options:
- name: record - name: record
default_value: "false" default_value: "false"
usage: Record current kubectl command in the resource annotation. usage: Record current kubectl command in the resource annotation.
- name: recursive
shorthand: R
default_value: "false"
usage: If true, process directory recursively.
- name: resource-version - name: resource-version
usage: | usage: |
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. 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.

View File

@ -10,6 +10,10 @@ options:
shorthand: f shorthand: f
default_value: "false" default_value: "false"
usage: Specify if the logs should be streamed. usage: Specify if the logs should be streamed.
- name: include-extended-apis
default_value: "true"
usage: |
If true, include definitions of new APIs via calls to the API server. [default true]
- name: interactive - name: interactive
default_value: "false" default_value: "false"
usage: If true, prompt the user for input when required. usage: If true, prompt the user for input when required.

View File

@ -12,6 +12,10 @@ options:
default_value: '[]' default_value: '[]'
usage: | usage: |
Filename, directory, or URL to a file identifying the resource to update Filename, directory, or URL to a file identifying the resource to update
- name: include-extended-apis
default_value: "true"
usage: |
If true, include definitions of new APIs via calls to the API server. [default true]
- name: output - name: output
shorthand: o shorthand: o
usage: | usage: |
@ -22,6 +26,10 @@ options:
- name: record - name: record
default_value: "false" default_value: "false"
usage: Record current kubectl command in the resource annotation. usage: Record current kubectl command in the resource annotation.
- name: recursive
shorthand: R
default_value: "false"
usage: If true, process directory recursively.
- name: type - name: type
default_value: strategic default_value: strategic
usage: | usage: |

View File

@ -25,6 +25,10 @@ options:
default_value: "-1" default_value: "-1"
usage: | usage: |
Only relevant during a force replace. Period of time in seconds given to the old resource to terminate gracefully. Ignored if negative. Only relevant during a force replace. Period of time in seconds given to the old resource to terminate gracefully. Ignored if negative.
- name: include-extended-apis
default_value: "true"
usage: |
If true, include definitions of new APIs via calls to the API server. [default true]
- name: output - name: output
shorthand: o shorthand: o
usage: | usage: |
@ -32,6 +36,10 @@ options:
- name: record - name: record
default_value: "false" default_value: "false"
usage: Record current kubectl command in the resource annotation. usage: Record current kubectl command in the resource annotation.
- name: recursive
shorthand: R
default_value: "false"
usage: If true, process directory recursively.
- name: save-config - name: save-config
default_value: "false" default_value: "false"
usage: | usage: |

View File

@ -26,6 +26,10 @@ options:
- name: image - name: image
usage: | usage: |
Image to use for upgrading the replication controller. Must be distinct from the existing image (either new image or new image tag). Can not be used with --filename/-f Image to use for upgrading the replication controller. Must be distinct from the existing image (either new image or new image tag). Can not be used with --filename/-f
- name: include-extended-apis
default_value: "true"
usage: |
If true, include definitions of new APIs via calls to the API server. [default true]
- name: no-headers - name: no-headers
default_value: "false" default_value: "false"
usage: When using the default output, don't print headers. usage: When using the default output, don't print headers.
@ -38,8 +42,8 @@ options:
Output the formatted object with the given group version (for ex: 'extensions/v1beta1'). Output the formatted object with the given group version (for ex: 'extensions/v1beta1').
- name: poll-interval - name: poll-interval
default_value: 3s default_value: 3s
usage: "Time delay between polling for replication controller status after the update. usage: |
Valid time units are \"ns\", \"us\" (or \"µs\"), \"ms\", \"s\", \"m\", \"h\".\n" Time delay between polling for replication controller status after the update. Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".
- name: rollback - name: rollback
default_value: "false" default_value: "false"
usage: | usage: |
@ -65,12 +69,12 @@ options:
Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview]. Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].
- name: timeout - name: timeout
default_value: 5m0s default_value: 5m0s
usage: "Max time to wait for a replication controller to update before giving up. usage: |
Valid time units are \"ns\", \"us\" (or \"µs\"), \"ms\", \"s\", \"m\", \"h\".\n" Max time to wait for a replication controller to update before giving up. Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".
- name: update-period - name: update-period
default_value: 1m0s default_value: 1m0s
usage: "Time to wait between updating pods. Valid time units are \"ns\", \"us\" usage: |
(or \"µs\"), \"ms\", \"s\", \"m\", \"h\".\n" Time to wait between updating pods. Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".
- name: validate - name: validate
default_value: "true" default_value: "true"
usage: | usage: |

View File

@ -32,6 +32,10 @@ options:
The host port mapping for the container port. To demonstrate a single-machine container. The host port mapping for the container port. To demonstrate a single-machine container.
- name: image - name: image
usage: The image for the container to run. usage: The image for the container to run.
- name: include-extended-apis
default_value: "true"
usage: |
If true, include definitions of new APIs via calls to the API server. [default true]
- name: labels - name: labels
shorthand: l shorthand: l
usage: Labels to apply to the pod(s). usage: Labels to apply to the pod(s).
@ -172,24 +176,35 @@ inherited_options:
- name: vmodule - name: vmodule
usage: | usage: |
comma-separated list of pattern=N settings for file-filtered logging comma-separated list of pattern=N settings for file-filtered logging
example: "# Start a single instance of nginx.\nkubectl run nginx --image=nginx\n\n# example: |-
Start a single instance of hazelcast and let the container expose port 5701 .\nkubectl # Start a single instance of nginx.
run hazelcast --image=hazelcast --port=5701\n\n# Start a single instance of hazelcast kubectl run nginx --image=nginx
and set environment variables \"DNS_DOMAIN=cluster\" and \"POD_NAMESPACE=default\"
in the container.\nkubectl run hazelcast --image=hazelcast --env=\"DNS_DOMAIN=cluster\" # Start a single instance of hazelcast and let the container expose port 5701 .
--env=\"POD_NAMESPACE=default\"\n\n# Start a replicated instance of nginx.\nkubectl kubectl run hazelcast --image=hazelcast --port=5701
run nginx --image=nginx --replicas=5\n\n# Dry run. Print the corresponding API objects
without creating them.\nkubectl run nginx --image=nginx --dry-run\n\n# Start a single # Start a single instance of hazelcast and set environment variables "DNS_DOMAIN=cluster" and "POD_NAMESPACE=default" in the container.
instance of nginx, but overload the spec of the deployment with a partial set of kubectl run hazelcast --image=hazelcast --env="DNS_DOMAIN=cluster" --env="POD_NAMESPACE=default"
values parsed from JSON.\nkubectl run nginx --image=nginx --overrides='{ \"apiVersion\":
\"v1\", \"spec\": { ... } }'\n\n# Start a single instance of busybox and keep it # Start a replicated instance of nginx.
in the foreground, don't restart it if it exits.\nkubectl run -i --tty busybox --image=busybox kubectl run nginx --image=nginx --replicas=5
--restart=Never\n\n# Start the nginx container using the default command, but use
custom arguments (arg1 .. argN) for that command.\nkubectl run nginx --image=nginx # Dry run. Print the corresponding API objects without creating them.
-- <arg1> <arg2> ... <argN>\n\n# Start the nginx container using a different command kubectl run nginx --image=nginx --dry-run
and custom arguments.\nkubectl run nginx --image=nginx --command -- <cmd> <arg1>
... <argN>\n\n# Start the perl container to compute π to 2000 places and print it # Start a single instance of nginx, but overload the spec of the deployment with a partial set of values parsed from JSON.
out.\nkubectl run pi --image=perl --restart=OnFailure -- perl -Mbignum=bpi -wle kubectl run nginx --image=nginx --overrides='{ "apiVersion": "v1", "spec": { ... } }'
'print bpi(2000)'"
# Start a single instance of busybox and keep it in the foreground, don't restart it if it exits.
kubectl run -i --tty busybox --image=busybox --restart=Never
# Start the nginx container using the default command, but use custom arguments (arg1 .. argN) for that command.
kubectl run nginx --image=nginx -- <arg1> <arg2> ... <argN>
# Start the nginx container using a different command and custom arguments.
kubectl run nginx --image=nginx --command -- <cmd> <arg1> ... <argN>
# Start the perl container to compute π to 2000 places and print it out.
kubectl run pi --image=perl --restart=OnFailure -- perl -Mbignum=bpi -wle 'print bpi(2000)'
see_also: see_also:
- kubectl - kubectl

View File

@ -18,6 +18,10 @@ options:
default_value: '[]' default_value: '[]'
usage: | usage: |
Filename, directory, or URL to a file identifying the resource to set a new size Filename, directory, or URL to a file identifying the resource to set a new size
- name: include-extended-apis
default_value: "true"
usage: |
If true, include definitions of new APIs via calls to the API server. [default true]
- name: output - name: output
shorthand: o shorthand: o
usage: | usage: |
@ -25,6 +29,10 @@ options:
- name: record - name: record
default_value: "false" default_value: "false"
usage: Record current kubectl command in the resource annotation. usage: Record current kubectl command in the resource annotation.
- name: recursive
shorthand: R
default_value: "false"
usage: If true, process directory recursively.
- name: replicas - name: replicas
default_value: "-1" default_value: "-1"
usage: The new desired number of replicas. Required. usage: The new desired number of replicas. Required.

View File

@ -25,10 +25,18 @@ options:
- name: ignore-not-found - name: ignore-not-found
default_value: "false" default_value: "false"
usage: Treat "resource not found" as a successful stop. usage: Treat "resource not found" as a successful stop.
- name: include-extended-apis
default_value: "true"
usage: |
If true, include definitions of new APIs via calls to the API server. [default true]
- name: output - name: output
shorthand: o shorthand: o
usage: | usage: |
Output mode. Use "-o name" for shorter output (resource/name). Output mode. Use "-o name" for shorter output (resource/name).
- name: recursive
shorthand: R
default_value: "false"
usage: If true, process directory recursively.
- name: selector - name: selector
shorthand: l shorthand: l
usage: Selector (label query) to filter on. usage: Selector (label query) to filter on.

View File

@ -27,6 +27,7 @@ kube::golang::setup_env
gendocs=$(kube::util::find-binary "gendocs") gendocs=$(kube::util::find-binary "gendocs")
genkubedocs=$(kube::util::find-binary "genkubedocs") genkubedocs=$(kube::util::find-binary "genkubedocs")
genman=$(kube::util::find-binary "genman") genman=$(kube::util::find-binary "genman")
genyaml=$(kube::util::find-binary "genyaml")
genbashcomp=$(kube::util::find-binary "genbashcomp") genbashcomp=$(kube::util::find-binary "genbashcomp")
mungedocs=$(kube::util::find-binary "mungedocs") mungedocs=$(kube::util::find-binary "mungedocs")

View File

@ -105,6 +105,7 @@ kube::golang::test_targets() {
cmd/gendocs cmd/gendocs
cmd/genkubedocs cmd/genkubedocs
cmd/genman cmd/genman
cmd/genyaml
cmd/mungedocs cmd/mungedocs
cmd/genbashcomp cmd/genbashcomp
cmd/genconversion cmd/genconversion

View File

@ -19,7 +19,7 @@ kube::util::sortable_date() {
} }
# this mimics the behavior of linux realpath which is not shipped by default with # this mimics the behavior of linux realpath which is not shipped by default with
# mac OS X # mac OS X
kube::util::realpath() { kube::util::realpath() {
[[ $1 = /* ]] && echo "$1" | sed 's/\/$//' || echo "$PWD/${1#./}" | sed 's/\/$//' [[ $1 = /* ]] && echo "$1" | sed 's/\/$//' || echo "$PWD/${1#./}" | sed 's/\/$//'
} }
@ -156,7 +156,7 @@ kube::util::host_platform() {
ppc64le*) ppc64le*)
host_arch=ppc64le host_arch=ppc64le
;; ;;
*) *)
kube::log::error "Unsupported host arch. Must be x86_64, 386, arm, s390x or ppc64le." kube::log::error "Unsupported host arch. Must be x86_64, 386, arm, s390x or ppc64le."
exit 1 exit 1
;; ;;
@ -185,6 +185,7 @@ kube::util::gen-docs() {
gendocs=$(kube::util::find-binary "gendocs") gendocs=$(kube::util::find-binary "gendocs")
genkubedocs=$(kube::util::find-binary "genkubedocs") genkubedocs=$(kube::util::find-binary "genkubedocs")
genman=$(kube::util::find-binary "genman") genman=$(kube::util::find-binary "genman")
genyaml=$(kube::util::find-binary "genyaml")
genbashcomp=$(kube::util::find-binary "genbashcomp") genbashcomp=$(kube::util::find-binary "genbashcomp")
mkdir -p "${dest}/docs/user-guide/kubectl/" mkdir -p "${dest}/docs/user-guide/kubectl/"
@ -197,6 +198,8 @@ kube::util::gen-docs() {
"${genkubedocs}" "${dest}/docs/admin/" "kubelet" "${genkubedocs}" "${dest}/docs/admin/" "kubelet"
mkdir -p "${dest}/docs/man/man1/" mkdir -p "${dest}/docs/man/man1/"
"${genman}" "${dest}/docs/man/man1/" "${genman}" "${dest}/docs/man/man1/"
mkdir -p "${dest}/docs/yaml/kubectl/"
"${genyaml}" "${dest}/docs/yaml/kubectl/"
mkdir -p "${dest}/contrib/completions/bash/" mkdir -p "${dest}/contrib/completions/bash/"
"${genbashcomp}" "${dest}/contrib/completions/bash/" "${genbashcomp}" "${dest}/contrib/completions/bash/"

View File

@ -23,7 +23,7 @@ source "${KUBE_ROOT}/hack/lib/init.sh"
kube::golang::setup_env kube::golang::setup_env
"${KUBE_ROOT}/hack/build-go.sh" cmd/gendocs cmd/genkubedocs cmd/genman cmd/genbashcomp cmd/mungedocs "${KUBE_ROOT}/hack/build-go.sh" cmd/gendocs cmd/genkubedocs cmd/genman cmd/genyaml cmd/genbashcomp cmd/mungedocs
"${KUBE_ROOT}/hack/after-build/update-generated-docs.sh" "$@" "${KUBE_ROOT}/hack/after-build/update-generated-docs.sh" "$@"

View File

@ -23,7 +23,7 @@ source "${KUBE_ROOT}/hack/lib/init.sh"
kube::golang::setup_env kube::golang::setup_env
"${KUBE_ROOT}/hack/build-go.sh" cmd/gendocs cmd/genkubedocs cmd/genman cmd/genbashcomp cmd/mungedocs "${KUBE_ROOT}/hack/build-go.sh" cmd/gendocs cmd/genkubedocs cmd/genman cmd/genyaml cmd/genbashcomp cmd/mungedocs
"${KUBE_ROOT}/hack/after-build/verify-generated-docs.sh" "$@" "${KUBE_ROOT}/hack/after-build/verify-generated-docs.sh" "$@"