Merge pull request #1970 from oke-py/doc

Fixed a wrong path and run `make generate`
This commit is contained in:
Kubernetes Prow Robot
2019-12-16 09:21:37 -08:00
committed by GitHub
8 changed files with 44 additions and 43 deletions

View File

@@ -39,7 +39,7 @@
#### 2. Modify the Generated Resources #### 2. Modify the Generated Resources
- modify the generated Resources by adding an annotation, sidecar container, etc. - modify the generated Resources by adding an annotation, sidecar container, etc.
- modify the `local-resources/example-use.yaml` by changing the replicas - modify the `local-resource/example-use.yaml` by changing the replicas
re-run `run`. this will apply the updated replicas to the generated Resources, re-run `run`. this will apply the updated replicas to the generated Resources,
but keep the fields that you manually added to the generated Resource configuration. but keep the fields that you manually added to the generated Resource configuration.
@@ -86,7 +86,7 @@
#### 2. Modify the Generated Resources #### 2. Modify the Generated Resources
- modify the generated Resources by adding an annotation, sidecar container, etc. - modify the generated Resources by adding an annotation, sidecar container, etc.
- modify the `local-resources/example-use.yaml` by changing the replicas - modify the `local-resource/example-use.yaml` by changing the replicas
re-run `run`. this will apply the updated replicas to the generated Resources, re-run `run`. this will apply the updated replicas to the generated Resources,
but keep the fields that you manually added to the generated Resource configuration. but keep the fields that you manually added to the generated Resource configuration.

View File

@@ -10,6 +10,7 @@ require (
github.com/stretchr/testify v1.4.0 github.com/stretchr/testify v1.4.0
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect
k8s.io/apimachinery v0.17.0 k8s.io/apimachinery v0.17.0
sigs.k8s.io/kustomize/cmd/mdtogo v0.0.0-20191213230335-75e9079baaad // indirect
sigs.k8s.io/kustomize/kyaml v0.0.0 sigs.k8s.io/kustomize/kyaml v0.0.0
) )

View File

@@ -149,5 +149,8 @@ k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8
k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk=
k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I=
k8s.io/kube-openapi v0.0.0-20191107075043-30be4d16710a/go.mod h1:1TqjTSzOxsLGIKfj0lK8EeCP7K1iUG65v09OM0/WG5E= k8s.io/kube-openapi v0.0.0-20191107075043-30be4d16710a/go.mod h1:1TqjTSzOxsLGIKfj0lK8EeCP7K1iUG65v09OM0/WG5E=
sigs.k8s.io/kustomize v2.0.3+incompatible h1:JUufWFNlI44MdtnjUqVnvh29rR37PQFzPbLXqhyOyX0=
sigs.k8s.io/kustomize/cmd/mdtogo v0.0.0-20191213230335-75e9079baaad h1:B3SHbhBKifnksHoh0m+z55nB7ueHFcPZBNHgGqwOf38=
sigs.k8s.io/kustomize/cmd/mdtogo v0.0.0-20191213230335-75e9079baaad/go.mod h1:arffnBwv6VTLUY3hxATxJ2fwNMWy92GSXm6UXEjFddQ=
sigs.k8s.io/structured-merge-diff v0.0.0-20190525122527-15d366b2352e/go.mod h1:wWxsB5ozmmv/SG7nM11ayaAW51xMvak/t1r0CSlcokI= sigs.k8s.io/structured-merge-diff v0.0.0-20190525122527-15d366b2352e/go.mod h1:wWxsB5ozmmv/SG7nM11ayaAW51xMvak/t1r0CSlcokI=
sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o=

View File

@@ -1,10 +1,9 @@
// Copyright 2019 The Kubernetes Authors.
// SPDX-License-Identifier: Apache-2.0
// Code generated by "mdtogo"; DO NOT EDIT. // Code generated by "mdtogo"; DO NOT EDIT.
package api package api
var ConfigFnLong = `# Configuration Functions API Semantics var ConfigFnLong=`# Configuration Functions API Semantics
Configuration Functions are functions packaged as executables in containers which enable Configuration Functions are functions packaged as executables in containers which enable
**shift-left practices**. They configure applications and infrastructure through **shift-left practices**. They configure applications and infrastructure through
@@ -286,7 +285,7 @@ Following is an example of running the ` + "`" + `kustomize config run` + "`" +
app: nginx app: nginx
instance: my-instance` instance: my-instance`
var ConfigIoLong = `# Configuration IO API Semantics var ConfigIoLong=`# Configuration IO API Semantics
Resource Configuration may be read / written from / to sources such as directories, Resource Configuration may be read / written from / to sources such as directories,
stdin|out or network. Tools may be composed using pipes such that the tools writing stdin|out or network. Tools may be composed using pipes such that the tools writing
@@ -344,7 +343,7 @@ Example:
annotations: annotations:
config.kubernetes.io/local-config: "true"` config.kubernetes.io/local-config: "true"`
var Merge2Long = `# Merge (2-way) var Merge2Long=`# Merge (2-way)
2-way merges fields from a source to a destination, overriding the destination fields 2-way merges fields from a source to a destination, overriding the destination fields
where they differ. where they differ.
@@ -436,7 +435,7 @@ var Merge2Long = `# Merge (2-way)
- name: sidecar2 - name: sidecar2
image: sidecar2:v1` image: sidecar2:v1`
var Merge3Long = `# Merge (3-way) var Merge3Long=`# Merge (3-way)
3-way merge identifies changes between an original source + updated source and merges the result 3-way merge identifies changes between an original source + updated source and merges the result
into a destination, overriding the destination fields where they have changed between into a destination, overriding the destination fields where they have changed between

View File

@@ -1,17 +1,16 @@
// Copyright 2019 The Kubernetes Authors.
// SPDX-License-Identifier: Apache-2.0
// Code generated by "mdtogo"; DO NOT EDIT. // Code generated by "mdtogo"; DO NOT EDIT.
package commands package commands
var CatShort = `[Alpha] Print Resource Config from a local directory.` var CatShort=`[Alpha] Print Resource Config from a local directory.`
var CatLong = ` var CatLong=`
[Alpha] Print Resource Config from a local directory. [Alpha] Print Resource Config from a local directory.
DIR: DIR:
Path to local directory. Path to local directory.
` `
var CatExamples = ` var CatExamples=`
# print Resource config from a directory # print Resource config from a directory
kustomize config cat my-dir/ kustomize config cat my-dir/
@@ -21,8 +20,8 @@ var CatExamples = `
# unwrap Resource config from a directory in an ResourceList # unwrap Resource config from a directory in an ResourceList
... | kustomize config cat` ... | kustomize config cat`
var CompletionShort = `Install shell completion.` var CompletionShort=`Install shell completion.`
var CompletionLong = ` var CompletionLong=`
Install shell completion for kustomize commands and flags -- supports bash, fish and zsh. Install shell completion for kustomize commands and flags -- supports bash, fish and zsh.
kustomize install-completion kustomize install-completion
@@ -38,19 +37,19 @@ To uninstall shell completion run:
COMP_UNINSTALL=1 kustomize install-completion` COMP_UNINSTALL=1 kustomize install-completion`
var CountShort = `[Alpha] Count Resources Config from a local directory.` var CountShort=`[Alpha] Count Resources Config from a local directory.`
var CountLong = ` var CountLong=`
[Alpha] Count Resources Config from a local directory. [Alpha] Count Resources Config from a local directory.
DIR: DIR:
Path to local directory. Path to local directory.
` `
var CountExamples = ` var CountExamples=`
# print Resource counts from a directory # print Resource counts from a directory
kustomize config count my-dir/` kustomize config count my-dir/`
var FmtShort = `[Alpha] Format yaml configuration files.` var FmtShort=`[Alpha] Format yaml configuration files.`
var FmtLong = ` var FmtLong=`
[Alpha] Format yaml configuration files. [Alpha] Format yaml configuration files.
Fmt will format input by ordering fields and unordered list items in Kubernetes Fmt will format input by ordering fields and unordered list items in Kubernetes
@@ -76,7 +75,7 @@ field paths.
- .spec.template.spec.containers (by element name) - .spec.template.spec.containers (by element name)
- .webhooks.rules.operations (by element value) - .webhooks.rules.operations (by element value)
` `
var FmtExamples = ` var FmtExamples=`
# format file1.yaml and file2.yml # format file1.yaml and file2.yml
kustomize config fmt file1.yaml file2.yml kustomize config fmt file1.yaml file2.yml
@@ -89,8 +88,8 @@ var FmtExamples = `
# format kustomize output # format kustomize output
kustomize build | kustomize config fmt` kustomize build | kustomize config fmt`
var GrepShort = `[Alpha] Search for matching Resources in a directory or from stdin` var GrepShort=`[Alpha] Search for matching Resources in a directory or from stdin`
var GrepLong = ` var GrepLong=`
[Alpha] Search for matching Resources in a directory or from stdin. [Alpha] Search for matching Resources in a directory or from stdin.
QUERY: QUERY:
@@ -103,7 +102,7 @@ var GrepLong = `
DIR: DIR:
Path to local directory. Path to local directory.
` `
var GrepExamples = ` var GrepExamples=`
# find Deployment Resources # find Deployment Resources
kustomize config grep "kind=Deployment" my-dir/ kustomize config grep "kind=Deployment" my-dir/
@@ -116,8 +115,8 @@ var GrepExamples = `
# look for Resources matching a specific container image # look for Resources matching a specific container image
kustomize config grep "spec.template.spec.containers[name=nginx].image=nginx:1\.7\.9" my-dir/ | kustomize config tree` kustomize config grep "spec.template.spec.containers[name=nginx].image=nginx:1\.7\.9" my-dir/ | kustomize config tree`
var MergeShort = `[Alpha] Merge Resource configuration files` var MergeShort=`[Alpha] Merge Resource configuration files`
var MergeLong = ` var MergeLong=`
[Alpha] Merge Resource configuration files [Alpha] Merge Resource configuration files
Merge reads Kubernetes Resource yaml configuration files from stdin or sources packages and write Merge reads Kubernetes Resource yaml configuration files from stdin or sources packages and write
@@ -133,11 +132,11 @@ For information on merge rules, run:
kustomize config docs merge kustomize config docs merge
` `
var MergeExamples = ` var MergeExamples=`
cat resources_and_patches.yaml | kustomize config merge > merged_resources.yaml` cat resources_and_patches.yaml | kustomize config merge > merged_resources.yaml`
var RunFnsShort = `[Alpha] Reoncile config functions to Resources.` var RunFnsShort=`[Alpha] Reoncile config functions to Resources.`
var RunFnsLong = ` var RunFnsLong=`
[Alpha] Reconcile config functions to Resources. [Alpha] Reconcile config functions to Resources.
run sequentially invokes all config functions in the directory, providing Resources run sequentially invokes all config functions in the directory, providing Resources
@@ -182,11 +181,11 @@ order they appear in the file).
See ` + "`" + `kustomize help config docs-fn` + "`" + ` for more details on writing functions. See ` + "`" + `kustomize help config docs-fn` + "`" + ` for more details on writing functions.
` `
var RunFnsExamples = ` var RunFnsExamples=`
kustomize config run example/` kustomize config run example/`
var TreeShort = `[Alpha] Display Resource structure from a directory or stdin.` var TreeShort=`[Alpha] Display Resource structure from a directory or stdin.`
var TreeLong = ` var TreeLong=`
[Alpha] Display Resource structure from a directory or stdin. [Alpha] Display Resource structure from a directory or stdin.
kustomize config tree may be used to print Resources in a directory or cluster, preserving structure kustomize config tree may be used to print Resources in a directory or cluster, preserving structure
@@ -206,7 +205,7 @@ kustomize config tree supports printing arbitrary fields using the '--field' fla
By default, kustomize config tree uses the directory structure for the tree structure, however when printing By default, kustomize config tree uses the directory structure for the tree structure, however when printing
from the cluster, the Resource graph structure may be used instead. from the cluster, the Resource graph structure may be used instead.
` `
var TreeExamples = ` var TreeExamples=`
# print Resources using directory structure # print Resources using directory structure
kustomize config tree my-dir/ kustomize config tree my-dir/

View File

@@ -1,11 +1,10 @@
// Copyright 2019 The Kubernetes Authors.
// SPDX-License-Identifier: Apache-2.0
// Code generated by "mdtogo"; DO NOT EDIT. // Code generated by "mdtogo"; DO NOT EDIT.
package tutorials package tutorials
var ConfigurationBasicsShort = `### Synopsis` var ConfigurationBasicsShort=`### Synopsis`
var ConfigurationBasicsLong = ` var ConfigurationBasicsLong=`
` + "`" + `kustomize config` + "`" + ` provides tools for working with local configuration directories. ` + "`" + `kustomize config` + "`" + ` provides tools for working with local configuration directories.
First fetch a bundle of configuration to your local file system from the First fetch a bundle of configuration to your local file system from the
@@ -277,8 +276,8 @@ var ConfigurationBasicsLong = `
│   └── image: <YOUR-CONTAINER> │   └── image: <YOUR-CONTAINER>
...` ...`
var FunctionBasicsShort = `### Synopsis` var FunctionBasicsShort=`### Synopsis`
var FunctionBasicsLong = ` var FunctionBasicsLong=`
` + "`" + `kustomize config` + "`" + ` enables encapsulating function for manipulating Resource ` + "`" + `kustomize config` + "`" + ` enables encapsulating function for manipulating Resource
configuration inside containers, which are run using ` + "`" + `run` + "`" + `. configuration inside containers, which are run using ` + "`" + `run` + "`" + `.
@@ -316,7 +315,7 @@ var FunctionBasicsLong = `
#### 2. Modify the Generated Resources #### 2. Modify the Generated Resources
- modify the generated Resources by adding an annotation, sidecar container, etc. - modify the generated Resources by adding an annotation, sidecar container, etc.
- modify the ` + "`" + `local-resources/example-use.yaml` + "`" + ` by changing the replicas - modify the ` + "`" + `local-resource/example-use.yaml` + "`" + ` by changing the replicas
re-run ` + "`" + `run` + "`" + `. this will apply the updated replicas to the generated Resources, re-run ` + "`" + `run` + "`" + `. this will apply the updated replicas to the generated Resources,
but keep the fields that you manually added to the generated Resource configuration. but keep the fields that you manually added to the generated Resource configuration.
@@ -363,7 +362,7 @@ var FunctionBasicsLong = `
#### 2. Modify the Generated Resources #### 2. Modify the Generated Resources
- modify the generated Resources by adding an annotation, sidecar container, etc. - modify the generated Resources by adding an annotation, sidecar container, etc.
- modify the ` + "`" + `local-resources/example-use.yaml` + "`" + ` by changing the replicas - modify the ` + "`" + `local-resource/example-use.yaml` + "`" + ` by changing the replicas
re-run ` + "`" + `run` + "`" + `. this will apply the updated replicas to the generated Resources, re-run ` + "`" + `run` + "`" + `. this will apply the updated replicas to the generated Resources,
but keep the fields that you manually added to the generated Resource configuration. but keep the fields that you manually added to the generated Resource configuration.

View File

@@ -29,7 +29,7 @@ with `metadata.configFn` and running:
kustomize config run local-resource/ kustomize config run local-resource/
This generates the `local-resources/config` directory containing the template output. This generates the `local-resource/config` directory containing the template output.
- the template output may be modified by adding fields -- such as initContainers, - the template output may be modified by adding fields -- such as initContainers,
sidecarConatiners, cpu resource limits, etc -- and these fields will be retained sidecarConatiners, cpu resource limits, etc -- and these fields will be retained

View File

@@ -24,7 +24,7 @@ with `metadata.configFn` and running:
kustomize config run local-resource/ kustomize config run local-resource/
This generates the `local-resources/config` directory containing the template output. This generates the `local-resource/config` directory containing the template output.
- the template output may be modified by adding fields -- such as initContainers, - the template output may be modified by adding fields -- such as initContainers,
sidecarConatiners, cpu resource limits, etc -- and these fields will be retained sidecarConatiners, cpu resource limits, etc -- and these fields will be retained