shell completion for kustomize commands

This commit is contained in:
Phillip Wittrock
2019-12-06 15:45:01 -08:00
parent 46be801a48
commit 2eacbeaa87
8 changed files with 153 additions and 5 deletions

View File

@@ -21,6 +21,23 @@ var CatExamples = `
# unwrap Resource config from a directory in an ResourceList
... | kustomize config cat`
var CompletionShort = `Install shell completion.`
var CompletionLong = `
Install shell completion for kustomize commands and flags -- supports bash, fish and zsh.
kustomize install-completion
Registers the completion command with known shells (e.g. .bashrc, .bash_profile, etc):
complete -C /Users/USER/go/bin/kustomize kustomize
Because the completion command is embedded in kustomize directly, there is no need to update
it separately from the kustomize binary.
To uninstall shell completion run:
COMP_UNINSTALL=1 kustomize install-completion`
var CountShort = `[Alpha] Count Resources Config from a local directory.`
var CountLong = `
[Alpha] Count Resources Config from a local directory.
@@ -123,7 +140,7 @@ var RunFnsShort = `[Alpha] Reoncile config functions to Resources.`
var RunFnsLong = `
[Alpha] Reconcile config functions to Resources.
run sequentially invokes all config functions in the directly, providing Resources
run sequentially invokes all config functions in the directory, providing Resources
in the directory as input to the first function, and writing the output of the last
function back to the directory.
@@ -140,7 +157,7 @@ order they appear in the file).
#### Config Functions:
Config functions are specified as Kubernetes types containing a metadata.configFn.container.image
field. This fields tells run how to invoke the container.
field. This field tells run how to invoke the container.
Example config function:
@@ -160,7 +177,7 @@ order they appear in the file).
In the preceding example, 'kustomize config run example/' would identify the function by
the metadata.configFn field. It would then write all Resources in the directory to
a container stdin (running the gcr.io/example/examplefunction:v1.0.1 image). It
would then writer the container stdout back to example/, replacing the directory
would then write the container stdout back to example/, replacing the directory
file contents.
See ` + "`" + `kustomize config help docs-fn` + "`" + ` for more details on writing functions.