diff --git a/cmd/config/docs/tutorials/function-basics.md b/cmd/config/docs/tutorials/function-basics.md index 39cf67989..63702e97a 100644 --- a/cmd/config/docs/tutorials/function-basics.md +++ b/cmd/config/docs/tutorials/function-basics.md @@ -39,7 +39,7 @@ #### 2. Modify the Generated Resources - modify the generated Resources by adding an annotation, sidecar container, etc. - - modify the `local-resource/example-use.yaml` by changing the replicas + - modify the `local-resources/example-use.yaml` by changing the replicas 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. @@ -86,7 +86,7 @@ #### 2. Modify the Generated Resources - modify the generated Resources by adding an annotation, sidecar container, etc. - - modify the `local-resource/example-use.yaml` by changing the replicas + - modify the `local-resources/example-use.yaml` by changing the replicas 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. diff --git a/cmd/config/go.mod b/cmd/config/go.mod index 19bec0e25..1378e6029 100644 --- a/cmd/config/go.mod +++ b/cmd/config/go.mod @@ -10,7 +10,6 @@ require ( github.com/stretchr/testify v1.4.0 gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect 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 ) diff --git a/cmd/config/go.sum b/cmd/config/go.sum index 65e2335a0..a18430907 100644 --- a/cmd/config/go.sum +++ b/cmd/config/go.sum @@ -149,8 +149,5 @@ 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 v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= 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/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= diff --git a/cmd/config/internal/generateddocs/api/docs.go b/cmd/config/internal/generateddocs/api/docs.go index 374b436bf..d0ea008d5 100644 --- a/cmd/config/internal/generateddocs/api/docs.go +++ b/cmd/config/internal/generateddocs/api/docs.go @@ -1,9 +1,10 @@ - +// Copyright 2019 The Kubernetes Authors. +// SPDX-License-Identifier: Apache-2.0 // Code generated by "mdtogo"; DO NOT EDIT. 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 **shift-left practices**. They configure applications and infrastructure through @@ -285,7 +286,7 @@ Following is an example of running the ` + "`" + `kustomize config run` + "`" + app: nginx 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, stdin|out or network. Tools may be composed using pipes such that the tools writing @@ -343,7 +344,7 @@ Example: annotations: 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 where they differ. @@ -435,7 +436,7 @@ var Merge2Long=`# Merge (2-way) - name: sidecar2 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 into a destination, overriding the destination fields where they have changed between diff --git a/cmd/config/internal/generateddocs/commands/docs.go b/cmd/config/internal/generateddocs/commands/docs.go index 3d34b85a3..fef935bfc 100644 --- a/cmd/config/internal/generateddocs/commands/docs.go +++ b/cmd/config/internal/generateddocs/commands/docs.go @@ -1,16 +1,17 @@ - +// Copyright 2019 The Kubernetes Authors. +// SPDX-License-Identifier: Apache-2.0 // Code generated by "mdtogo"; DO NOT EDIT. package commands -var CatShort=`[Alpha] Print Resource Config from a local directory.` -var CatLong=` +var CatShort = `[Alpha] Print Resource Config from a local directory.` +var CatLong = ` [Alpha] Print Resource Config from a local directory. DIR: Path to local directory. ` -var CatExamples=` +var CatExamples = ` # print Resource config from a directory kustomize config cat my-dir/ @@ -20,8 +21,8 @@ var CatExamples=` # unwrap Resource config from a directory in an ResourceList ... | kustomize config cat` -var CompletionShort=`Install shell completion.` -var CompletionLong=` +var CompletionShort = `Install shell completion.` +var CompletionLong = ` Install shell completion for kustomize commands and flags -- supports bash, fish and zsh. kustomize install-completion @@ -37,19 +38,19 @@ To uninstall shell completion run: COMP_UNINSTALL=1 kustomize install-completion` -var CountShort=`[Alpha] Count Resources Config from a local directory.` -var CountLong=` +var CountShort = `[Alpha] Count Resources Config from a local directory.` +var CountLong = ` [Alpha] Count Resources Config from a local directory. DIR: Path to local directory. ` -var CountExamples=` +var CountExamples = ` # print Resource counts from a directory kustomize config count my-dir/` -var FmtShort=`[Alpha] Format yaml configuration files.` -var FmtLong=` +var FmtShort = `[Alpha] Format yaml configuration files.` +var FmtLong = ` [Alpha] Format yaml configuration files. Fmt will format input by ordering fields and unordered list items in Kubernetes @@ -75,7 +76,7 @@ field paths. - .spec.template.spec.containers (by element name) - .webhooks.rules.operations (by element value) ` -var FmtExamples=` +var FmtExamples = ` # format file1.yaml and file2.yml kustomize config fmt file1.yaml file2.yml @@ -88,8 +89,8 @@ var FmtExamples=` # format kustomize output kustomize build | kustomize config fmt` -var GrepShort=`[Alpha] Search for matching Resources in a directory or from stdin` -var GrepLong=` +var GrepShort = `[Alpha] Search for matching Resources in a directory or from stdin` +var GrepLong = ` [Alpha] Search for matching Resources in a directory or from stdin. QUERY: @@ -102,7 +103,7 @@ var GrepLong=` DIR: Path to local directory. ` -var GrepExamples=` +var GrepExamples = ` # find Deployment Resources kustomize config grep "kind=Deployment" my-dir/ @@ -115,8 +116,8 @@ var GrepExamples=` # 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` -var MergeShort=`[Alpha] Merge Resource configuration files` -var MergeLong=` +var MergeShort = `[Alpha] Merge Resource configuration files` +var MergeLong = ` [Alpha] Merge Resource configuration files Merge reads Kubernetes Resource yaml configuration files from stdin or sources packages and write @@ -132,11 +133,11 @@ For information on merge rules, run: kustomize config docs merge ` -var MergeExamples=` +var MergeExamples = ` cat resources_and_patches.yaml | kustomize config merge > merged_resources.yaml` -var RunFnsShort=`[Alpha] Reoncile config functions to Resources.` -var RunFnsLong=` +var RunFnsShort = `[Alpha] Reoncile config functions to Resources.` +var RunFnsLong = ` [Alpha] Reconcile config functions to Resources. run sequentially invokes all config functions in the directory, providing Resources @@ -181,11 +182,11 @@ order they appear in the file). See ` + "`" + `kustomize help config docs-fn` + "`" + ` for more details on writing functions. ` -var RunFnsExamples=` +var RunFnsExamples = ` kustomize config run example/` -var TreeShort=`[Alpha] Display Resource structure from a directory or stdin.` -var TreeLong=` +var TreeShort = `[Alpha] Display Resource structure from a directory or stdin.` +var TreeLong = ` [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 @@ -205,7 +206,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 from the cluster, the Resource graph structure may be used instead. ` -var TreeExamples=` +var TreeExamples = ` # print Resources using directory structure kustomize config tree my-dir/ diff --git a/cmd/config/internal/generateddocs/tutorials/docs.go b/cmd/config/internal/generateddocs/tutorials/docs.go index c30f3c1b3..3f5e81c9e 100644 --- a/cmd/config/internal/generateddocs/tutorials/docs.go +++ b/cmd/config/internal/generateddocs/tutorials/docs.go @@ -1,10 +1,11 @@ - +// Copyright 2019 The Kubernetes Authors. +// SPDX-License-Identifier: Apache-2.0 // Code generated by "mdtogo"; DO NOT EDIT. package tutorials -var ConfigurationBasicsShort=`### Synopsis` -var ConfigurationBasicsLong=` +var ConfigurationBasicsShort = `### Synopsis` +var ConfigurationBasicsLong = ` ` + "`" + `kustomize config` + "`" + ` provides tools for working with local configuration directories. First fetch a bundle of configuration to your local file system from the @@ -276,8 +277,8 @@ var ConfigurationBasicsLong=` │   └── image: ...` -var FunctionBasicsShort=`### Synopsis` -var FunctionBasicsLong=` +var FunctionBasicsShort = `### Synopsis` +var FunctionBasicsLong = ` ` + "`" + `kustomize config` + "`" + ` enables encapsulating function for manipulating Resource configuration inside containers, which are run using ` + "`" + `run` + "`" + `. @@ -315,7 +316,7 @@ var FunctionBasicsLong=` #### 2. Modify the Generated Resources - modify the generated Resources by adding an annotation, sidecar container, etc. - - modify the ` + "`" + `local-resource/example-use.yaml` + "`" + ` by changing the replicas + - modify the ` + "`" + `local-resources/example-use.yaml` + "`" + ` by changing the replicas 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. @@ -362,7 +363,7 @@ var FunctionBasicsLong=` #### 2. Modify the Generated Resources - modify the generated Resources by adding an annotation, sidecar container, etc. - - modify the ` + "`" + `local-resource/example-use.yaml` + "`" + ` by changing the replicas + - modify the ` + "`" + `local-resources/example-use.yaml` + "`" + ` by changing the replicas 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. diff --git a/functions/examples/template-go-nginx/README.md b/functions/examples/template-go-nginx/README.md index 94e529328..ad6bc133d 100644 --- a/functions/examples/template-go-nginx/README.md +++ b/functions/examples/template-go-nginx/README.md @@ -29,7 +29,7 @@ with `metadata.configFn` and running: kustomize config run local-resource/ -This generates the `local-resource/config` directory containing the template output. +This generates the `local-resources/config` directory containing the template output. - the template output may be modified by adding fields -- such as initContainers, sidecarConatiners, cpu resource limits, etc -- and these fields will be retained diff --git a/functions/examples/template-heredoc-cockroachdb/README.md b/functions/examples/template-heredoc-cockroachdb/README.md index da390b012..90c39cfc8 100644 --- a/functions/examples/template-heredoc-cockroachdb/README.md +++ b/functions/examples/template-heredoc-cockroachdb/README.md @@ -24,7 +24,7 @@ with `metadata.configFn` and running: kustomize config run local-resource/ -This generates the `local-resource/config` directory containing the template output. +This generates the `local-resources/config` directory containing the template output. - the template output may be modified by adding fields -- such as initContainers, sidecarConatiners, cpu resource limits, etc -- and these fields will be retained