{"owner":"kubernetes-sigs","repo":"kustomize","hasSkills":true,"totalSkillsCount":17,"totalTokensCount":4073,"categories":["command-prompt"],"hasMcp":false,"mcpConfig":null,"found":["cmd/config/docs/commands/annotate.md","cmd/config/docs/commands/cat.md","cmd/config/docs/commands/completion.md","cmd/config/docs/commands/count.md","cmd/config/docs/commands/create-setter.md","cmd/config/docs/commands/delete-setter.md","cmd/config/docs/commands/fmt.md","cmd/config/docs/commands/grep.md","cmd/config/docs/commands/init.md","cmd/config/docs/commands/list-setters.md","cmd/config/docs/commands/merge.md","cmd/config/docs/commands/merge3.md","cmd/config/docs/commands/run-fns.md","cmd/config/docs/commands/set.md","cmd/config/docs/commands/sink.md","cmd/config/docs/commands/source.md","cmd/config/docs/commands/tree.md"],"skills":{"cmd/config/docs/commands/annotate.md":"## annotate\n\n[Alpha] Set an annotation on Resources.\n\n### Synopsis\n\n[Alpha]  Set an annotation on Resources.\n\n  DIR:\n    Path to local directory.\n\n### Examples\n\n    kustomize cfg annotate my-dir/ --kv foo=bar\n\n    kustomize cfg annotate my-dir/ --kv foo=bar --kv a=b\n\n    kustomize cfg annotate my-dir/ --kv foo=bar --kind Deployment --name foo\n","cmd/config/docs/commands/cat.md":"## cat\n\n[Alpha] Print Resource Config from a local directory.\n\n### Synopsis\n\n[Alpha]  Print Resource Config from a local directory.\n\n  DIR:\n    Path to local directory.\n\n### Examples\n\n    # print Resource config from a directory\n    kustomize cfg cat my-dir/\n\n    # wrap Resource config from a directory in an ResourceList\n    kustomize cfg cat my-dir/ --wrap-kind ResourceList --wrap-version config.kubernetes.io/v1alpha1 --function-config fn.yaml\n\n    # unwrap Resource config from a directory in an ResourceList\n    ... | kustomize cfg cat\n","cmd/config/docs/commands/completion.md":"## completion\n\nGenerate shell completion.\n\n### Synopsis\n\nGenerate shell completion for `kustomize` -- supports bash, zsh, fish and powershell.\n\n### Examples\n\n    # load completion for Bash\n    source <(kustomize completion bash)\n\n    # install for Bash in Linux\n    kustomize completion bash > /etc/bash_completion.d/kustomize\n\n    # install for Bash in MacOS\n    kustomize completion bash > /usr/local/etc/bash_completion.d/kustomize\n\n    # package for Bash\n    kustomize completion bash > /usr/share/bash-completion/completions/kustomize\n\n    # package for zsh\n    kustomize completion zsh > /usr/share/zsh/site-functions/_kustomize\n\n","cmd/config/docs/commands/count.md":"## count\n\n[Alpha] Count Resources Config from a local directory.\n\n### Synopsis\n\n[Alpha] Count Resources Config from a local directory.\n\n  DIR:\n    Path to local directory.\n\n### Examples\n\n    # print Resource counts from a directory\n    kustomize cfg count my-dir/","cmd/config/docs/commands/create-setter.md":"## create-setter\n\n[Alpha] Create a custom setter for a Resource field\n\n### Synopsis\n\nCreate a custom setter for a Resource field by inlining OpenAPI as comments.\n\n  DIR\n\n    A directory containing Resource configuration.\n\n  NAME\n\n    The name of the setter to create.\n\n  VALUE\n\n    The current value of the field, or a substring within the field.\n\n### Creating a Custom Setter\n\n**Given the YAML:**\n\n    # resource.yaml\n    apiVersion: v1\n    kind: Service\n    metadata:\n      ...\n    spec:\n      ...\n      ports:\n        ...\n      - name: http\n        port: 8080\n        ...\n\n**Create a new setter:**\n\n    # create a setter for ports\n    $ kustomize cfg set create DIR/ http-port 8080 --type \"integer\" --field \"port\"\n\n  Resources fields with a field name matching `--field` and field value matching `VALUE` will\n  have a line comment added marking this field as settable.\n\n**Newly modified YAML:**\n\n    # resource.yaml\n    apiVersion: v1\n    kind: Service\n    metadata:\n      ...\n    spec:\n      ...\n      ports:\n        ...\n      - name: http\n        port: 8080  # {\"type\":\"integer\",\"x-kustomize\":{\"partialFieldSetters\":[{\"name\":\"http-port\",\"value\":\"8080\"}]}}\n        ...\n\n  Setters may also be defined directly by editing the yaml and adding the comment.\n\nUsers may not set the field value using the `set` command:\n\n    # change the http-port value to 8081\n    $ kustomize cfg set DIR/ http-port 8081\n\n### Using default values\n\nThe default values for a setter may be:\n\n- valid field values (e.g. `8080` or `008080` for a port)\n- invalid values that adhere to the schema (e.g. `0000` for a port)\n- values that do not adhere to the schema (e.g. `[PORT]` for port)\n\nA setter may be for a substring of a full field:\n\n    $ kustomize cfg set create DIR/ image-tag v1.0.01 --type \"string\" --field \"image\"\n\n    image: gcr.io/example/app:v1.0.1 # # {\"type\":\"string\",\"x-kustomize\":{\"partialFieldSetters\":[{\"name\":\"image-tag\",\"value\":\"v1.0.1\"}]}}\n\nA single field value may have multiple setters applied to it for different parts of the field.\n\n### Examples\n\n    # create a setter for port fields matching \"8080\"\n    kustomize cfg create-setter DIR/ port 8080 --type \"integer\" --field port \\\n         --description \"default port used by the app\"\n\n    # create a setter for a substring of a field rather than the full field -- e.g. only the\n    # image tag, not the full image\n    kustomize cfg create-setter DIR/ image-tag v1.0.1 --type \"string\" \\\n        --field image --description \"current stable release\"","cmd/config/docs/commands/delete-setter.md":"## delete-setter\n\n[Alpha] Delete a custom setter for a Resource field\n\n### Synopsis\n\nDelete a custom setter for a Resource field.\n\n  DIR\n\n    A directory containing Resource configuration.\n\n  NAME\n\n    The name of the setter to create.\n\n### Deleting a Custom Setter\n\n**Given the YAML:**\n\n    # resource.yaml\n    apiVersion: v1\n    kind: Service\n    metadata:\n      ...\n    spec:\n      ...\n      ports:\n        ...\n      - name: http\n        port: 8080  # {\"type\":\"integer\",\"x-kustomize\":{\"partialFieldSetters\":[{\"name\":\"http-port\",\"value\":\"8080\"}]}}\n        ...\n\n**Delete setter:**\n\n    # delete a setter for ports\n    $ kustomize cfg set create DIR/ http-port\n\ncomment will be removed for this field is not settable any more.\n\n**Newly modified YAML:**\n\n    # resource.yaml\n    apiVersion: v1\n    kind: Service\n    metadata:\n      ...\n    spec:\n      ...\n      ports:\n        ...\n      - name: http\n        port: 8080\n        ...\n\n\n### Deleting a setter used in substitution\n\nIf the setter is also used in substitution, it will ask you to delete the substitution first.\n\n\n### Examples\n\n    # delete a setter for port\n    kustomize cfg create-setter DIR/ port","cmd/config/docs/commands/fmt.md":"## fmt\n\n[Alpha] Format yaml configuration files.\n\n### Synopsis\n\n[Alpha] Format yaml configuration files.\n\nFmt will format input by ordering fields and unordered list items in Kubernetes\nobjects.  Inputs may be directories, files or stdin, and their contents must\ninclude both apiVersion and kind fields.\n\n- Stdin inputs are formatted and written to stdout\n- File inputs (args) are formatted and written back to the file\n- Directory inputs (args) are walked, each encountered .yaml and .yml file\n  acts as an input\n\nFor inputs which contain multiple yaml documents separated by \\n---\\n,\neach document will be formatted and written back to the file in the original\norder.\n\nField ordering roughly follows the ordering defined in the source Kubernetes\nresource definitions (i.e. go structures), falling back on lexicographical\nsorting for unrecognized fields.\n\nUnordered list item ordering is defined for specific Resource types and\nfield paths.\n\n- .spec.template.spec.containers (by element name)\n- .webhooks.rules.operations (by element value)\n\n### Examples\n\n\t# format file1.yaml and file2.yml\n\tkustomize cfg fmt file1.yaml file2.yml\n\n\t# format all *.yaml and *.yml recursively traversing directories\n\tkustomize cfg fmt my-dir/\n\n\t# format kubectl output\n\tkubectl get -o yaml deployments | kustomize cfg fmt\n\n\t# format kustomize output\n\tkustomize build | kustomize cfg fmt","cmd/config/docs/commands/grep.md":"## grep\n\n[Alpha] Search for matching Resources in a directory or from stdin\n\n### Synopsis\n\n[Alpha] Search for matching Resources in a directory or from stdin.\n\n  QUERY:\n    Query to match expressed as 'path.to.field=value'.\n    Maps and fields are matched as '.field-name' or '.map-key'\n    List elements are matched as '[list-elem-field=field-value]'\n    The value to match is expressed as '=value'\n    '.' as part of a key or value can be escaped as '\\.'\n\n  DIR:\n    Path to local directory.\n\n### Examples\n\n    # find Deployment Resources\n    kustomize cfg grep \"kind=Deployment\" my-dir/\n\n    # find Resources named nginx\n    kustomize cfg grep \"metadata.name=nginx\" my-dir/\n\n    # use tree to display matching Resources\n    kustomize cfg grep \"metadata.name=nginx\" my-dir/ | kustomize cfg tree\n\n    # look for Resources matching a specific container image\n    kustomize cfg grep \"spec.template.spec.containers[name=nginx].image=nginx:1\\.7\\.9\" my-dir/ | kustomize cfg tree\n","cmd/config/docs/commands/init.md":"## init\n\n[Alpha] Initialize a directory with a Krmfile.\n\n### Synopsis\n\n[Alpha]  Initialize a directory with a Krmfile.\n\n  DIR:\n    Path to local directory.\n\n### Examples\n\n    # create a Krmfile in the local directory\n    kustomize cfg init\n\n    # create a Krmfile in my-dir/\n    kustomize cfg init my-dir/\n","cmd/config/docs/commands/list-setters.md":"## set\n\n[Alpha] List setters for Resources.\n\n### Synopsis\n\nList setters for Resources.\n\n  DIR\n\n    A directory containing Resource configuration.\n\n  NAME\n\n    Optional.  The name of the setter to display.\n\n### Examples\n\n  Show setters:\n\n    $ kustomize cfg list-setters DIR/\n        NAME      DESCRIPTION   VALUE     TYPE     COUNT   SETBY  \n    name-prefix   ''            PREFIX    string   2\n","cmd/config/docs/commands/merge.md":"## merge\n\n[Alpha] Merge Resource configuration files\n\n### Synopsis\n\n[Alpha] Merge Resource configuration files\n\nMerge reads Kubernetes Resource yaml configuration files from stdin or sources packages and write\nthe result to stdout or a destination package.\n\nResources are merged using the Resource [apiVersion, kind, name, namespace] as the key.  If any of\nthese are missing, merge will default the missing values to empty.\n\nResources specified later are high-precedence (the source) and Resources specified\nearlier are lower-precedence (the destination).\n\nFor information on merge rules, run:\n\n\tkustomize cfg docs merge\n\n### Examples\n\n    cat resources_and_patches.yaml | kustomize cfg merge > merged_resources.yaml","cmd/config/docs/commands/merge3.md":"## merge3\n\n[Alpha] Merge diff of Resource configuration files into a destination (3-way)\n\n### Synopsis\n\n[Alpha] Merge diff of Resource configuration files into a destination (3-way)\n\nMerge3 performs a 3-way merge by applying the diff between 2 sets of Resources to a 3rd set.\n\nMerge3 may be for rebasing changes to a forked set of configuration -- e.g. compute the difference between the original\nset of Resources that was forked and an updated set of those Resources, then apply that difference to the fork.\n\nIf a field value differs between the ORIGINAL_DIR and UPDATED_DIR, the value from the UPDATED_DIR is taken and applied\nto the Resource in the DEST_DIR.\n\nFor information on merge rules, run:\n\n\tkustomize cfg docs-merge3\n\n### Examples\n\n    kustomize cfg merge3 --ancestor a/ --from b/ --to c/","cmd/config/docs/commands/run-fns.md":"## run\n\n[Alpha] Reconcile config functions to Resources.\n\n### Synopsis\n\n[Alpha] Reconcile config functions to Resources.\n\nrun sequentially invokes all config functions in the directory, providing Resources\nin the directory as input to the first function, and writing the output of the last\nfunction back to the directory.\n\nThe ordering of functions is determined by the order they are encountered when walking the\ndirectory.  To clearly specify an ordering of functions, multiple functions may be\ndeclared in the same file, separated by '---' (the functions will be invoked in the\norder they appear in the file).\n\n#### Arguments:\n\n  DIR:\n    Path to local directory.\n\n#### Config Functions:\n\n  Config functions are specified as Kubernetes types containing a metadata.annotations.[config.kubernetes.io/function]\n  field specifying an image for the container to run.  This image tells run how to invoke the container.\n\n  Example config function:\n\n\t# in file example/fn.yaml\n\tapiVersion: fn.example.com/v1beta1\n\tkind: ExampleFunctionKind\n\tmetadata:\n\t  annotations:\n\t    config.kubernetes.io/function: |\n\t      container:\n\t        # function is invoked as a container running this image\n\t        image: gcr.io/example/examplefunction:v1.0.1\n\t    config.kubernetes.io/local-config: \"true\" # tools should ignore this\n\tspec:\n\t  configField: configValue\n\n  In the preceding example, 'kustomize fn run example/' would identify the function by\n  the metadata.annotations.[config.kubernetes.io/function] field.  It would then write all Resources in the directory to\n  a container stdin (running the gcr.io/example/examplefunction:v1.0.1 image).  It\n  would then write the container stdout back to example/, replacing the directory\n  file contents.\n\n  See `kustomize docs-fn` for more details on writing functions.\n\n### Examples\n\nkustomize fn run example/\n","cmd/config/docs/commands/set.md":"## set\n\n[Alpha] Set values on Resources fields values.\n\n### Synopsis\n\nSet values on Resources fields.  May set either the complete or partial field value.\n\n`set` identifies setters using field metadata published as OpenAPI extensions.\n`set` parses both the Kubernetes OpenAPI, as well OpenAPI published inline in\nthe configuration as comments.\n\n`set` maybe be used to:\n\n- edit configuration programmatically from the cli\n- create reusable bundles of configuration with custom setters\n\n  DIR\n\n    A directory containing Resource configuration.\n\n  NAME\n\n    Optional.  The name of the setter to perform or display.\n\n  VALUE\n\n    Optional.  The value to set on the field.\n\n\nTo print the possible setters for the Resources in a directory, run\n`list-setters` on a directory -- e.g. `kustomize cfg list-setters DIR/`.\n\n#### Tips\n\n- A description of the value may be specified with `--description`.\n- The last setter for the field's value may be defined with `--set-by`.\n- Create custom setters on Resources, Kustomization.yaml's, patches, etc\n\nThe description and setBy fields are left unmodified unless specified with flags.\n\nTo create a custom setter for a field see: `kustomize help cfg create-setter`\n\n### Examples\n\n  Resource YAML: Name Prefix Setter\n\n    # DIR/resources.yaml\n    ...\n    metadata:\n        name: PREFIX-app1 # {\"type\":\"string\",\"x-kustomize\":{\"setter\":[{\"name\":\"name-prefix\",\"value\":\"PREFIX\"}]}}\n    ...\n    ---\n    ...\n    metadata:\n        name: PREFIX-app2 # {\"type\":\"string\",\"x-kustomize\":{\"setter\":[{\"name\":\"name-prefix\",\"value\":\"PREFIX\"}]}}\n    ...\n\n  List setters: Show the possible setters\n\n    $ config list-setters DIR/\n        NAME      DESCRIPTION   VALUE     TYPE     COUNT   SETBY  \n    name-prefix   ''            PREFIX    string   2\n\n  Perform set: set a new value, owner and description\n\n    $ kustomize cfg set DIR/ name-prefix \"test\" --description \"test environment\" --set-by \"dev\"\n    set 2 values\n\n  List setters: Show the new values\n\n    $ config list-setters DIR/\n        NAME      DESCRIPTION         VALUE     TYPE     COUNT     SETBY \n    name-prefix   'test environment'   test     string   2          dev\n\n  New Resource YAML:\n\n    # DIR/resources.yaml\n    ...\n    metadata:\n        name: test-app1 # {\"description\":\"test environment\",\"type\":\"string\",\"x-kustomize\":{\"setBy\":\"dev\",\"setter\":[{\"name\":\"name-prefix\",\"value\":\"test\"}]}}\n    ...\n    ---\n    ...\n    metadata:\n        name: test-app2 # {\"description\":\"test environment\",\"type\":\"string\",\"x-kustomize\":{\"setBy\":\"dev\",\"setter\":[{\"name\":\"name-prefix\",\"value\":\"test\"}]}}\n    ...\n","cmd/config/docs/commands/sink.md":"## sink\n\n[Alpha] Implement a Sink by writing input to a local directory.\n\n### Synopsis\n\n[Alpha] Implement a Sink by writing input to a local directory.\n\n    kustomize fn sink [DIR]\n\n  DIR:\n    Path to local directory.  If unspecified, sink will write to stdout as if it were a single file.\n\n`sink` writes its input to a directory\n\n### Examples\n\n    kustomize fn source DIR/ | your-function | kustomize fn sink DIR/\n","cmd/config/docs/commands/source.md":"## source\n\n[Alpha] Implement a Source by reading a local directory.\n\n### Synopsis\n\n[Alpha] Implement a Source by reading a local directory.\n\n    kustomize fn source DIR...\n\n  DIR:\n    One or more paths to local directories.  Contents from directories will be concatenated.\n    If no directories are provided, source will read from stdin as if it were a single file.\n\n`source` emits configuration to act as input to a function\n\n### Examples\n\n    # emity configuration directory as input source to a function\n    kustomize fn source DIR/\n\n    kustomize fn source DIR/ | your-function | kustomize fn sink DIR/\n","cmd/config/docs/commands/tree.md":"## tree\n\n[Alpha] Display Resource structure from a directory or stdin.\n\n### Synopsis\n\n[Alpha] Display Resource structure from a directory or stdin.\n\nkustomize cfg tree may be used to print Resources in a directory or cluster, preserving structure\n\nArgs:\n\n  DIR:\n    Path to local directory directory.\n\nResource fields may be printed as part of the Resources by specifying the fields as flags.\n\nkustomize cfg tree has built-in support for printing common fields, such as replicas, container images,\ncontainer names, etc.\n\nkustomize cfg tree supports printing arbitrary fields using the '--field' flag.\n\nBy default, kustomize cfg tree uses Resource graph structure if any relationships between resources (ownerReferences)\nare detected, as is typically the case when printing from a cluster. Otherwise, directory graph structure is used. The\ngraph structure can also be selected explicitly using the '--graph-structure' flag.\n\n### Examples\n\n    # print Resources using directory structure\n    kustomize cfg tree my-dir/\n\n    # print replicas, container name, and container image and fields for Resources\n    kustomize cfg tree my-dir --replicas --image --name\n\n    # print all common Resource fields\n    kustomize cfg tree my-dir/ --all\n\n    # print the \"foo\"\" annotation\n    kustomize cfg tree my-dir/ --field \"metadata.annotations.foo\"\n\n    # print the \"foo\"\" annotation\n    kubectl get all -o yaml | kustomize cfg tree \\\n      --field=\"status.conditions[type=Completed].status\"\n\n    # print live Resources from a cluster using owners for graph structure\n    kubectl get all -o yaml | kustomize cfg tree --replicas --name --image\n\n    # print live Resources with status condition fields\n    kubectl get all -o yaml | kustomize cfg tree \\\n      --name --image --replicas \\\n      --field=\"status.conditions[type=Completed].status\" \\\n      --field=\"status.conditions[type=Complete].status\" \\\n      --field=\"status.conditions[type=Ready].status\" \\\n      --field=\"status.conditions[type=ContainersReady].status\"\n"},"files":{"cmd/config/docs/commands/annotate.md":"## annotate\n\n[Alpha] Set an annotation on Resources.\n\n### Synopsis\n\n[Alpha]  Set an annotation on Resources.\n\n  DIR:\n    Path to local directory.\n\n### Examples\n\n    kustomize cfg annotate my-dir/ --kv foo=bar\n\n    kustomize cfg annotate my-dir/ --kv foo=bar --kv a=b\n\n    kustomize cfg annotate my-dir/ --kv foo=bar --kind Deployment --name foo\n","cmd/config/docs/commands/cat.md":"## cat\n\n[Alpha] Print Resource Config from a local directory.\n\n### Synopsis\n\n[Alpha]  Print Resource Config from a local directory.\n\n  DIR:\n    Path to local directory.\n\n### Examples\n\n    # print Resource config from a directory\n    kustomize cfg cat my-dir/\n\n    # wrap Resource config from a directory in an ResourceList\n    kustomize cfg cat my-dir/ --wrap-kind ResourceList --wrap-version config.kubernetes.io/v1alpha1 --function-config fn.yaml\n\n    # unwrap Resource config from a directory in an ResourceList\n    ... | kustomize cfg cat\n","cmd/config/docs/commands/completion.md":"## completion\n\nGenerate shell completion.\n\n### Synopsis\n\nGenerate shell completion for `kustomize` -- supports bash, zsh, fish and powershell.\n\n### Examples\n\n    # load completion for Bash\n    source <(kustomize completion bash)\n\n    # install for Bash in Linux\n    kustomize completion bash > /etc/bash_completion.d/kustomize\n\n    # install for Bash in MacOS\n    kustomize completion bash > /usr/local/etc/bash_completion.d/kustomize\n\n    # package for Bash\n    kustomize completion bash > /usr/share/bash-completion/completions/kustomize\n\n    # package for zsh\n    kustomize completion zsh > /usr/share/zsh/site-functions/_kustomize\n\n","cmd/config/docs/commands/count.md":"## count\n\n[Alpha] Count Resources Config from a local directory.\n\n### Synopsis\n\n[Alpha] Count Resources Config from a local directory.\n\n  DIR:\n    Path to local directory.\n\n### Examples\n\n    # print Resource counts from a directory\n    kustomize cfg count my-dir/","cmd/config/docs/commands/create-setter.md":"## create-setter\n\n[Alpha] Create a custom setter for a Resource field\n\n### Synopsis\n\nCreate a custom setter for a Resource field by inlining OpenAPI as comments.\n\n  DIR\n\n    A directory containing Resource configuration.\n\n  NAME\n\n    The name of the setter to create.\n\n  VALUE\n\n    The current value of the field, or a substring within the field.\n\n### Creating a Custom Setter\n\n**Given the YAML:**\n\n    # resource.yaml\n    apiVersion: v1\n    kind: Service\n    metadata:\n      ...\n    spec:\n      ...\n      ports:\n        ...\n      - name: http\n        port: 8080\n        ...\n\n**Create a new setter:**\n\n    # create a setter for ports\n    $ kustomize cfg set create DIR/ http-port 8080 --type \"integer\" --field \"port\"\n\n  Resources fields with a field name matching `--field` and field value matching `VALUE` will\n  have a line comment added marking this field as settable.\n\n**Newly modified YAML:**\n\n    # resource.yaml\n    apiVersion: v1\n    kind: Service\n    metadata:\n      ...\n    spec:\n      ...\n      ports:\n        ...\n      - name: http\n        port: 8080  # {\"type\":\"integer\",\"x-kustomize\":{\"partialFieldSetters\":[{\"name\":\"http-port\",\"value\":\"8080\"}]}}\n        ...\n\n  Setters may also be defined directly by editing the yaml and adding the comment.\n\nUsers may not set the field value using the `set` command:\n\n    # change the http-port value to 8081\n    $ kustomize cfg set DIR/ http-port 8081\n\n### Using default values\n\nThe default values for a setter may be:\n\n- valid field values (e.g. `8080` or `008080` for a port)\n- invalid values that adhere to the schema (e.g. `0000` for a port)\n- values that do not adhere to the schema (e.g. `[PORT]` for port)\n\nA setter may be for a substring of a full field:\n\n    $ kustomize cfg set create DIR/ image-tag v1.0.01 --type \"string\" --field \"image\"\n\n    image: gcr.io/example/app:v1.0.1 # # {\"type\":\"string\",\"x-kustomize\":{\"partialFieldSetters\":[{\"name\":\"image-tag\",\"value\":\"v1.0.1\"}]}}\n\nA single field value may have multiple setters applied to it for different parts of the field.\n\n### Examples\n\n    # create a setter for port fields matching \"8080\"\n    kustomize cfg create-setter DIR/ port 8080 --type \"integer\" --field port \\\n         --description \"default port used by the app\"\n\n    # create a setter for a substring of a field rather than the full field -- e.g. only the\n    # image tag, not the full image\n    kustomize cfg create-setter DIR/ image-tag v1.0.1 --type \"string\" \\\n        --field image --description \"current stable release\"","cmd/config/docs/commands/delete-setter.md":"## delete-setter\n\n[Alpha] Delete a custom setter for a Resource field\n\n### Synopsis\n\nDelete a custom setter for a Resource field.\n\n  DIR\n\n    A directory containing Resource configuration.\n\n  NAME\n\n    The name of the setter to create.\n\n### Deleting a Custom Setter\n\n**Given the YAML:**\n\n    # resource.yaml\n    apiVersion: v1\n    kind: Service\n    metadata:\n      ...\n    spec:\n      ...\n      ports:\n        ...\n      - name: http\n        port: 8080  # {\"type\":\"integer\",\"x-kustomize\":{\"partialFieldSetters\":[{\"name\":\"http-port\",\"value\":\"8080\"}]}}\n        ...\n\n**Delete setter:**\n\n    # delete a setter for ports\n    $ kustomize cfg set create DIR/ http-port\n\ncomment will be removed for this field is not settable any more.\n\n**Newly modified YAML:**\n\n    # resource.yaml\n    apiVersion: v1\n    kind: Service\n    metadata:\n      ...\n    spec:\n      ...\n      ports:\n        ...\n      - name: http\n        port: 8080\n        ...\n\n\n### Deleting a setter used in substitution\n\nIf the setter is also used in substitution, it will ask you to delete the substitution first.\n\n\n### Examples\n\n    # delete a setter for port\n    kustomize cfg create-setter DIR/ port","cmd/config/docs/commands/fmt.md":"## fmt\n\n[Alpha] Format yaml configuration files.\n\n### Synopsis\n\n[Alpha] Format yaml configuration files.\n\nFmt will format input by ordering fields and unordered list items in Kubernetes\nobjects.  Inputs may be directories, files or stdin, and their contents must\ninclude both apiVersion and kind fields.\n\n- Stdin inputs are formatted and written to stdout\n- File inputs (args) are formatted and written back to the file\n- Directory inputs (args) are walked, each encountered .yaml and .yml file\n  acts as an input\n\nFor inputs which contain multiple yaml documents separated by \\n---\\n,\neach document will be formatted and written back to the file in the original\norder.\n\nField ordering roughly follows the ordering defined in the source Kubernetes\nresource definitions (i.e. go structures), falling back on lexicographical\nsorting for unrecognized fields.\n\nUnordered list item ordering is defined for specific Resource types and\nfield paths.\n\n- .spec.template.spec.containers (by element name)\n- .webhooks.rules.operations (by element value)\n\n### Examples\n\n\t# format file1.yaml and file2.yml\n\tkustomize cfg fmt file1.yaml file2.yml\n\n\t# format all *.yaml and *.yml recursively traversing directories\n\tkustomize cfg fmt my-dir/\n\n\t# format kubectl output\n\tkubectl get -o yaml deployments | kustomize cfg fmt\n\n\t# format kustomize output\n\tkustomize build | kustomize cfg fmt","cmd/config/docs/commands/grep.md":"## grep\n\n[Alpha] Search for matching Resources in a directory or from stdin\n\n### Synopsis\n\n[Alpha] Search for matching Resources in a directory or from stdin.\n\n  QUERY:\n    Query to match expressed as 'path.to.field=value'.\n    Maps and fields are matched as '.field-name' or '.map-key'\n    List elements are matched as '[list-elem-field=field-value]'\n    The value to match is expressed as '=value'\n    '.' as part of a key or value can be escaped as '\\.'\n\n  DIR:\n    Path to local directory.\n\n### Examples\n\n    # find Deployment Resources\n    kustomize cfg grep \"kind=Deployment\" my-dir/\n\n    # find Resources named nginx\n    kustomize cfg grep \"metadata.name=nginx\" my-dir/\n\n    # use tree to display matching Resources\n    kustomize cfg grep \"metadata.name=nginx\" my-dir/ | kustomize cfg tree\n\n    # look for Resources matching a specific container image\n    kustomize cfg grep \"spec.template.spec.containers[name=nginx].image=nginx:1\\.7\\.9\" my-dir/ | kustomize cfg tree\n","cmd/config/docs/commands/init.md":"## init\n\n[Alpha] Initialize a directory with a Krmfile.\n\n### Synopsis\n\n[Alpha]  Initialize a directory with a Krmfile.\n\n  DIR:\n    Path to local directory.\n\n### Examples\n\n    # create a Krmfile in the local directory\n    kustomize cfg init\n\n    # create a Krmfile in my-dir/\n    kustomize cfg init my-dir/\n","cmd/config/docs/commands/list-setters.md":"## set\n\n[Alpha] List setters for Resources.\n\n### Synopsis\n\nList setters for Resources.\n\n  DIR\n\n    A directory containing Resource configuration.\n\n  NAME\n\n    Optional.  The name of the setter to display.\n\n### Examples\n\n  Show setters:\n\n    $ kustomize cfg list-setters DIR/\n        NAME      DESCRIPTION   VALUE     TYPE     COUNT   SETBY  \n    name-prefix   ''            PREFIX    string   2\n","cmd/config/docs/commands/merge.md":"## merge\n\n[Alpha] Merge Resource configuration files\n\n### Synopsis\n\n[Alpha] Merge Resource configuration files\n\nMerge reads Kubernetes Resource yaml configuration files from stdin or sources packages and write\nthe result to stdout or a destination package.\n\nResources are merged using the Resource [apiVersion, kind, name, namespace] as the key.  If any of\nthese are missing, merge will default the missing values to empty.\n\nResources specified later are high-precedence (the source) and Resources specified\nearlier are lower-precedence (the destination).\n\nFor information on merge rules, run:\n\n\tkustomize cfg docs merge\n\n### Examples\n\n    cat resources_and_patches.yaml | kustomize cfg merge > merged_resources.yaml","cmd/config/docs/commands/merge3.md":"## merge3\n\n[Alpha] Merge diff of Resource configuration files into a destination (3-way)\n\n### Synopsis\n\n[Alpha] Merge diff of Resource configuration files into a destination (3-way)\n\nMerge3 performs a 3-way merge by applying the diff between 2 sets of Resources to a 3rd set.\n\nMerge3 may be for rebasing changes to a forked set of configuration -- e.g. compute the difference between the original\nset of Resources that was forked and an updated set of those Resources, then apply that difference to the fork.\n\nIf a field value differs between the ORIGINAL_DIR and UPDATED_DIR, the value from the UPDATED_DIR is taken and applied\nto the Resource in the DEST_DIR.\n\nFor information on merge rules, run:\n\n\tkustomize cfg docs-merge3\n\n### Examples\n\n    kustomize cfg merge3 --ancestor a/ --from b/ --to c/","cmd/config/docs/commands/run-fns.md":"## run\n\n[Alpha] Reconcile config functions to Resources.\n\n### Synopsis\n\n[Alpha] Reconcile config functions to Resources.\n\nrun sequentially invokes all config functions in the directory, providing Resources\nin the directory as input to the first function, and writing the output of the last\nfunction back to the directory.\n\nThe ordering of functions is determined by the order they are encountered when walking the\ndirectory.  To clearly specify an ordering of functions, multiple functions may be\ndeclared in the same file, separated by '---' (the functions will be invoked in the\norder they appear in the file).\n\n#### Arguments:\n\n  DIR:\n    Path to local directory.\n\n#### Config Functions:\n\n  Config functions are specified as Kubernetes types containing a metadata.annotations.[config.kubernetes.io/function]\n  field specifying an image for the container to run.  This image tells run how to invoke the container.\n\n  Example config function:\n\n\t# in file example/fn.yaml\n\tapiVersion: fn.example.com/v1beta1\n\tkind: ExampleFunctionKind\n\tmetadata:\n\t  annotations:\n\t    config.kubernetes.io/function: |\n\t      container:\n\t        # function is invoked as a container running this image\n\t        image: gcr.io/example/examplefunction:v1.0.1\n\t    config.kubernetes.io/local-config: \"true\" # tools should ignore this\n\tspec:\n\t  configField: configValue\n\n  In the preceding example, 'kustomize fn run example/' would identify the function by\n  the metadata.annotations.[config.kubernetes.io/function] field.  It would then write all Resources in the directory to\n  a container stdin (running the gcr.io/example/examplefunction:v1.0.1 image).  It\n  would then write the container stdout back to example/, replacing the directory\n  file contents.\n\n  See `kustomize docs-fn` for more details on writing functions.\n\n### Examples\n\nkustomize fn run example/\n","cmd/config/docs/commands/set.md":"## set\n\n[Alpha] Set values on Resources fields values.\n\n### Synopsis\n\nSet values on Resources fields.  May set either the complete or partial field value.\n\n`set` identifies setters using field metadata published as OpenAPI extensions.\n`set` parses both the Kubernetes OpenAPI, as well OpenAPI published inline in\nthe configuration as comments.\n\n`set` maybe be used to:\n\n- edit configuration programmatically from the cli\n- create reusable bundles of configuration with custom setters\n\n  DIR\n\n    A directory containing Resource configuration.\n\n  NAME\n\n    Optional.  The name of the setter to perform or display.\n\n  VALUE\n\n    Optional.  The value to set on the field.\n\n\nTo print the possible setters for the Resources in a directory, run\n`list-setters` on a directory -- e.g. `kustomize cfg list-setters DIR/`.\n\n#### Tips\n\n- A description of the value may be specified with `--description`.\n- The last setter for the field's value may be defined with `--set-by`.\n- Create custom setters on Resources, Kustomization.yaml's, patches, etc\n\nThe description and setBy fields are left unmodified unless specified with flags.\n\nTo create a custom setter for a field see: `kustomize help cfg create-setter`\n\n### Examples\n\n  Resource YAML: Name Prefix Setter\n\n    # DIR/resources.yaml\n    ...\n    metadata:\n        name: PREFIX-app1 # {\"type\":\"string\",\"x-kustomize\":{\"setter\":[{\"name\":\"name-prefix\",\"value\":\"PREFIX\"}]}}\n    ...\n    ---\n    ...\n    metadata:\n        name: PREFIX-app2 # {\"type\":\"string\",\"x-kustomize\":{\"setter\":[{\"name\":\"name-prefix\",\"value\":\"PREFIX\"}]}}\n    ...\n\n  List setters: Show the possible setters\n\n    $ config list-setters DIR/\n        NAME      DESCRIPTION   VALUE     TYPE     COUNT   SETBY  \n    name-prefix   ''            PREFIX    string   2\n\n  Perform set: set a new value, owner and description\n\n    $ kustomize cfg set DIR/ name-prefix \"test\" --description \"test environment\" --set-by \"dev\"\n    set 2 values\n\n  List setters: Show the new values\n\n    $ config list-setters DIR/\n        NAME      DESCRIPTION         VALUE     TYPE     COUNT     SETBY \n    name-prefix   'test environment'   test     string   2          dev\n\n  New Resource YAML:\n\n    # DIR/resources.yaml\n    ...\n    metadata:\n        name: test-app1 # {\"description\":\"test environment\",\"type\":\"string\",\"x-kustomize\":{\"setBy\":\"dev\",\"setter\":[{\"name\":\"name-prefix\",\"value\":\"test\"}]}}\n    ...\n    ---\n    ...\n    metadata:\n        name: test-app2 # {\"description\":\"test environment\",\"type\":\"string\",\"x-kustomize\":{\"setBy\":\"dev\",\"setter\":[{\"name\":\"name-prefix\",\"value\":\"test\"}]}}\n    ...\n","cmd/config/docs/commands/sink.md":"## sink\n\n[Alpha] Implement a Sink by writing input to a local directory.\n\n### Synopsis\n\n[Alpha] Implement a Sink by writing input to a local directory.\n\n    kustomize fn sink [DIR]\n\n  DIR:\n    Path to local directory.  If unspecified, sink will write to stdout as if it were a single file.\n\n`sink` writes its input to a directory\n\n### Examples\n\n    kustomize fn source DIR/ | your-function | kustomize fn sink DIR/\n","cmd/config/docs/commands/source.md":"## source\n\n[Alpha] Implement a Source by reading a local directory.\n\n### Synopsis\n\n[Alpha] Implement a Source by reading a local directory.\n\n    kustomize fn source DIR...\n\n  DIR:\n    One or more paths to local directories.  Contents from directories will be concatenated.\n    If no directories are provided, source will read from stdin as if it were a single file.\n\n`source` emits configuration to act as input to a function\n\n### Examples\n\n    # emity configuration directory as input source to a function\n    kustomize fn source DIR/\n\n    kustomize fn source DIR/ | your-function | kustomize fn sink DIR/\n","cmd/config/docs/commands/tree.md":"## tree\n\n[Alpha] Display Resource structure from a directory or stdin.\n\n### Synopsis\n\n[Alpha] Display Resource structure from a directory or stdin.\n\nkustomize cfg tree may be used to print Resources in a directory or cluster, preserving structure\n\nArgs:\n\n  DIR:\n    Path to local directory directory.\n\nResource fields may be printed as part of the Resources by specifying the fields as flags.\n\nkustomize cfg tree has built-in support for printing common fields, such as replicas, container images,\ncontainer names, etc.\n\nkustomize cfg tree supports printing arbitrary fields using the '--field' flag.\n\nBy default, kustomize cfg tree uses Resource graph structure if any relationships between resources (ownerReferences)\nare detected, as is typically the case when printing from a cluster. Otherwise, directory graph structure is used. The\ngraph structure can also be selected explicitly using the '--graph-structure' flag.\n\n### Examples\n\n    # print Resources using directory structure\n    kustomize cfg tree my-dir/\n\n    # print replicas, container name, and container image and fields for Resources\n    kustomize cfg tree my-dir --replicas --image --name\n\n    # print all common Resource fields\n    kustomize cfg tree my-dir/ --all\n\n    # print the \"foo\"\" annotation\n    kustomize cfg tree my-dir/ --field \"metadata.annotations.foo\"\n\n    # print the \"foo\"\" annotation\n    kubectl get all -o yaml | kustomize cfg tree \\\n      --field=\"status.conditions[type=Completed].status\"\n\n    # print live Resources from a cluster using owners for graph structure\n    kubectl get all -o yaml | kustomize cfg tree --replicas --name --image\n\n    # print live Resources with status condition fields\n    kubectl get all -o yaml | kustomize cfg tree \\\n      --name --image --replicas \\\n      --field=\"status.conditions[type=Completed].status\" \\\n      --field=\"status.conditions[type=Complete].status\" \\\n      --field=\"status.conditions[type=Ready].status\" \\\n      --field=\"status.conditions[type=ContainersReady].status\"\n"},"items":[{"name":"annotate.md","path":"cmd/config/docs/commands/annotate.md","rawUrl":"https://raw.githubusercontent.com/kubernetes-sigs/kustomize/HEAD/cmd/config/docs/commands/annotate.md","title":"Command: /annotate","category":"command-prompt","format":"markdown","content":"## annotate\n\n[Alpha] Set an annotation on Resources.\n\n### Synopsis\n\n[Alpha]  Set an annotation on Resources.\n\n  DIR:\n    Path to local directory.\n\n### Examples\n\n    kustomize cfg annotate my-dir/ --kv foo=bar\n\n    kustomize cfg annotate my-dir/ --kv foo=bar --kv a=b\n\n    kustomize cfg annotate my-dir/ --kv foo=bar --kind Deployment --name foo\n","isInternal":false,"tokens":92,"sizeBytes":345},{"name":"cat.md","path":"cmd/config/docs/commands/cat.md","rawUrl":"https://raw.githubusercontent.com/kubernetes-sigs/kustomize/HEAD/cmd/config/docs/commands/cat.md","title":"Command: /cat","category":"command-prompt","format":"markdown","content":"## cat\n\n[Alpha] Print Resource Config from a local directory.\n\n### Synopsis\n\n[Alpha]  Print Resource Config from a local directory.\n\n  DIR:\n    Path to local directory.\n\n### Examples\n\n    # print Resource config from a directory\n    kustomize cfg cat my-dir/\n\n    # wrap Resource config from a directory in an ResourceList\n    kustomize cfg cat my-dir/ --wrap-kind ResourceList --wrap-version config.kubernetes.io/v1alpha1 --function-config fn.yaml\n\n    # unwrap Resource config from a directory in an ResourceList\n    ... | kustomize cfg cat\n","isInternal":false,"tokens":125,"sizeBytes":543},{"name":"completion.md","path":"cmd/config/docs/commands/completion.md","rawUrl":"https://raw.githubusercontent.com/kubernetes-sigs/kustomize/HEAD/cmd/config/docs/commands/completion.md","title":"Command: /completion","category":"command-prompt","format":"markdown","content":"## completion\n\nGenerate shell completion.\n\n### Synopsis\n\nGenerate shell completion for `kustomize` -- supports bash, zsh, fish and powershell.\n\n### Examples\n\n    # load completion for Bash\n    source <(kustomize completion bash)\n\n    # install for Bash in Linux\n    kustomize completion bash > /etc/bash_completion.d/kustomize\n\n    # install for Bash in MacOS\n    kustomize completion bash > /usr/local/etc/bash_completion.d/kustomize\n\n    # package for Bash\n    kustomize completion bash > /usr/share/bash-completion/completions/kustomize\n\n    # package for zsh\n    kustomize completion zsh > /usr/share/zsh/site-functions/_kustomize\n\n","isInternal":false,"tokens":154,"sizeBytes":636},{"name":"count.md","path":"cmd/config/docs/commands/count.md","rawUrl":"https://raw.githubusercontent.com/kubernetes-sigs/kustomize/HEAD/cmd/config/docs/commands/count.md","title":"Command: /count","category":"command-prompt","format":"markdown","content":"## count\n\n[Alpha] Count Resources Config from a local directory.\n\n### Synopsis\n\n[Alpha] Count Resources Config from a local directory.\n\n  DIR:\n    Path to local directory.\n\n### Examples\n\n    # print Resource counts from a directory\n    kustomize cfg count my-dir/","isInternal":false,"tokens":58,"sizeBytes":263},{"name":"create-setter.md","path":"cmd/config/docs/commands/create-setter.md","rawUrl":"https://raw.githubusercontent.com/kubernetes-sigs/kustomize/HEAD/cmd/config/docs/commands/create-setter.md","title":"Command: /create-setter","category":"command-prompt","format":"markdown","content":"## create-setter\n\n[Alpha] Create a custom setter for a Resource field\n\n### Synopsis\n\nCreate a custom setter for a Resource field by inlining OpenAPI as comments.\n\n  DIR\n\n    A directory containing Resource configuration.\n\n  NAME\n\n    The name of the setter to create.\n\n  VALUE\n\n    The current value of the field, or a substring within the field.\n\n### Creating a Custom Setter\n\n**Given the YAML:**\n\n    # resource.yaml\n    apiVersion: v1\n    kind: Service\n    metadata:\n      ...\n    spec:\n      ...\n      ports:\n        ...\n      - name: http\n        port: 8080\n        ...\n\n**Create a new setter:**\n\n    # create a setter for ports\n    $ kustomize cfg set create DIR/ http-port 8080 --type \"integer\" --field \"port\"\n\n  Resources fields with a field name matching `--field` and field value matching `VALUE` will\n  have a line comment added marking this field as settable.\n\n**Newly modified YAML:**\n\n    # resource.yaml\n    apiVersion: v1\n    kind: Service\n    metadata:\n      ...\n    spec:\n      ...\n      ports:\n        ...\n      - name: http\n        port: 8080  # {\"type\":\"integer\",\"x-kustomize\":{\"partialFieldSetters\":[{\"name\":\"http-port\",\"value\":\"8080\"}]}}\n        ...\n\n  Setters may also be defined directly by editing the yaml and adding the comment.\n\nUsers may not set the field value using the `set` command:\n\n    # change the http-port value to 8081\n    $ kustomize cfg set DIR/ http-port 8081\n\n### Using default values\n\nThe default values for a setter may be:\n\n- valid field values (e.g. `8080` or `008080` for a port)\n- invalid values that adhere to the schema (e.g. `0000` for a port)\n- values that do not adhere to the schema (e.g. `[PORT]` for port)\n\nA setter may be for a substring of a full field:\n\n    $ kustomize cfg set create DIR/ image-tag v1.0.01 --type \"string\" --field \"image\"\n\n    image: gcr.io/example/app:v1.0.1 # # {\"type\":\"string\",\"x-kustomize\":{\"partialFieldSetters\":[{\"name\":\"image-tag\",\"value\":\"v1.0.1\"}]}}\n\nA single field value may have multiple setters applied to it for different parts of the field.\n\n### Examples\n\n    # create a setter for port fields matching \"8080\"\n    kustomize cfg create-setter DIR/ port 8080 --type \"integer\" --field port \\\n         --description \"default port used by the app\"\n\n    # create a setter for a substring of a field rather than the full field -- e.g. only the\n    # image tag, not the full image\n    kustomize cfg create-setter DIR/ image-tag v1.0.1 --type \"string\" \\\n        --field image --description \"current stable release\"","isInternal":false,"tokens":647,"sizeBytes":2499},{"name":"delete-setter.md","path":"cmd/config/docs/commands/delete-setter.md","rawUrl":"https://raw.githubusercontent.com/kubernetes-sigs/kustomize/HEAD/cmd/config/docs/commands/delete-setter.md","title":"Command: /delete-setter","category":"command-prompt","format":"markdown","content":"## delete-setter\n\n[Alpha] Delete a custom setter for a Resource field\n\n### Synopsis\n\nDelete a custom setter for a Resource field.\n\n  DIR\n\n    A directory containing Resource configuration.\n\n  NAME\n\n    The name of the setter to create.\n\n### Deleting a Custom Setter\n\n**Given the YAML:**\n\n    # resource.yaml\n    apiVersion: v1\n    kind: Service\n    metadata:\n      ...\n    spec:\n      ...\n      ports:\n        ...\n      - name: http\n        port: 8080  # {\"type\":\"integer\",\"x-kustomize\":{\"partialFieldSetters\":[{\"name\":\"http-port\",\"value\":\"8080\"}]}}\n        ...\n\n**Delete setter:**\n\n    # delete a setter for ports\n    $ kustomize cfg set create DIR/ http-port\n\ncomment will be removed for this field is not settable any more.\n\n**Newly modified YAML:**\n\n    # resource.yaml\n    apiVersion: v1\n    kind: Service\n    metadata:\n      ...\n    spec:\n      ...\n      ports:\n        ...\n      - name: http\n        port: 8080\n        ...\n\n\n### Deleting a setter used in substitution\n\nIf the setter is also used in substitution, it will ask you to delete the substitution first.\n\n\n### Examples\n\n    # delete a setter for port\n    kustomize cfg create-setter DIR/ port","isInternal":false,"tokens":282,"sizeBytes":1158},{"name":"fmt.md","path":"cmd/config/docs/commands/fmt.md","rawUrl":"https://raw.githubusercontent.com/kubernetes-sigs/kustomize/HEAD/cmd/config/docs/commands/fmt.md","title":"Command: /fmt","category":"command-prompt","format":"markdown","content":"## fmt\n\n[Alpha] Format yaml configuration files.\n\n### Synopsis\n\n[Alpha] Format yaml configuration files.\n\nFmt will format input by ordering fields and unordered list items in Kubernetes\nobjects.  Inputs may be directories, files or stdin, and their contents must\ninclude both apiVersion and kind fields.\n\n- Stdin inputs are formatted and written to stdout\n- File inputs (args) are formatted and written back to the file\n- Directory inputs (args) are walked, each encountered .yaml and .yml file\n  acts as an input\n\nFor inputs which contain multiple yaml documents separated by \\n---\\n,\neach document will be formatted and written back to the file in the original\norder.\n\nField ordering roughly follows the ordering defined in the source Kubernetes\nresource definitions (i.e. go structures), falling back on lexicographical\nsorting for unrecognized fields.\n\nUnordered list item ordering is defined for specific Resource types and\nfield paths.\n\n- .spec.template.spec.containers (by element name)\n- .webhooks.rules.operations (by element value)\n\n### Examples\n\n\t# format file1.yaml and file2.yml\n\tkustomize cfg fmt file1.yaml file2.yml\n\n\t# format all *.yaml and *.yml recursively traversing directories\n\tkustomize cfg fmt my-dir/\n\n\t# format kubectl output\n\tkubectl get -o yaml deployments | kustomize cfg fmt\n\n\t# format kustomize output\n\tkustomize build | kustomize cfg fmt","isInternal":false,"tokens":304,"sizeBytes":1369},{"name":"grep.md","path":"cmd/config/docs/commands/grep.md","rawUrl":"https://raw.githubusercontent.com/kubernetes-sigs/kustomize/HEAD/cmd/config/docs/commands/grep.md","title":"Command: /grep","category":"command-prompt","format":"markdown","content":"## grep\n\n[Alpha] Search for matching Resources in a directory or from stdin\n\n### Synopsis\n\n[Alpha] Search for matching Resources in a directory or from stdin.\n\n  QUERY:\n    Query to match expressed as 'path.to.field=value'.\n    Maps and fields are matched as '.field-name' or '.map-key'\n    List elements are matched as '[list-elem-field=field-value]'\n    The value to match is expressed as '=value'\n    '.' as part of a key or value can be escaped as '\\.'\n\n  DIR:\n    Path to local directory.\n\n### Examples\n\n    # find Deployment Resources\n    kustomize cfg grep \"kind=Deployment\" my-dir/\n\n    # find Resources named nginx\n    kustomize cfg grep \"metadata.name=nginx\" my-dir/\n\n    # use tree to display matching Resources\n    kustomize cfg grep \"metadata.name=nginx\" my-dir/ | kustomize cfg tree\n\n    # look for Resources matching a specific container image\n    kustomize cfg grep \"spec.template.spec.containers[name=nginx].image=nginx:1\\.7\\.9\" my-dir/ | kustomize cfg tree\n","isInternal":false,"tokens":238,"sizeBytes":975},{"name":"init.md","path":"cmd/config/docs/commands/init.md","rawUrl":"https://raw.githubusercontent.com/kubernetes-sigs/kustomize/HEAD/cmd/config/docs/commands/init.md","title":"Command: /init","category":"command-prompt","format":"markdown","content":"## init\n\n[Alpha] Initialize a directory with a Krmfile.\n\n### Synopsis\n\n[Alpha]  Initialize a directory with a Krmfile.\n\n  DIR:\n    Path to local directory.\n\n### Examples\n\n    # create a Krmfile in the local directory\n    kustomize cfg init\n\n    # create a Krmfile in my-dir/\n    kustomize cfg init my-dir/\n","isInternal":false,"tokens":82,"sizeBytes":306},{"name":"list-setters.md","path":"cmd/config/docs/commands/list-setters.md","rawUrl":"https://raw.githubusercontent.com/kubernetes-sigs/kustomize/HEAD/cmd/config/docs/commands/list-setters.md","title":"Command: /list-setters","category":"command-prompt","format":"markdown","content":"## set\n\n[Alpha] List setters for Resources.\n\n### Synopsis\n\nList setters for Resources.\n\n  DIR\n\n    A directory containing Resource configuration.\n\n  NAME\n\n    Optional.  The name of the setter to display.\n\n### Examples\n\n  Show setters:\n\n    $ kustomize cfg list-setters DIR/\n        NAME      DESCRIPTION   VALUE     TYPE     COUNT   SETBY  \n    name-prefix   ''            PREFIX    string   2\n","isInternal":false,"tokens":89,"sizeBytes":395},{"name":"merge.md","path":"cmd/config/docs/commands/merge.md","rawUrl":"https://raw.githubusercontent.com/kubernetes-sigs/kustomize/HEAD/cmd/config/docs/commands/merge.md","title":"Command: /merge","category":"command-prompt","format":"markdown","content":"## merge\n\n[Alpha] Merge Resource configuration files\n\n### Synopsis\n\n[Alpha] Merge Resource configuration files\n\nMerge reads Kubernetes Resource yaml configuration files from stdin or sources packages and write\nthe result to stdout or a destination package.\n\nResources are merged using the Resource [apiVersion, kind, name, namespace] as the key.  If any of\nthese are missing, merge will default the missing values to empty.\n\nResources specified later are high-precedence (the source) and Resources specified\nearlier are lower-precedence (the destination).\n\nFor information on merge rules, run:\n\n\tkustomize cfg docs merge\n\n### Examples\n\n    cat resources_and_patches.yaml | kustomize cfg merge > merged_resources.yaml","isInternal":false,"tokens":145,"sizeBytes":716},{"name":"merge3.md","path":"cmd/config/docs/commands/merge3.md","rawUrl":"https://raw.githubusercontent.com/kubernetes-sigs/kustomize/HEAD/cmd/config/docs/commands/merge3.md","title":"Command: /merge3","category":"command-prompt","format":"markdown","content":"## merge3\n\n[Alpha] Merge diff of Resource configuration files into a destination (3-way)\n\n### Synopsis\n\n[Alpha] Merge diff of Resource configuration files into a destination (3-way)\n\nMerge3 performs a 3-way merge by applying the diff between 2 sets of Resources to a 3rd set.\n\nMerge3 may be for rebasing changes to a forked set of configuration -- e.g. compute the difference between the original\nset of Resources that was forked and an updated set of those Resources, then apply that difference to the fork.\n\nIf a field value differs between the ORIGINAL_DIR and UPDATED_DIR, the value from the UPDATED_DIR is taken and applied\nto the Resource in the DEST_DIR.\n\nFor information on merge rules, run:\n\n\tkustomize cfg docs-merge3\n\n### Examples\n\n    kustomize cfg merge3 --ancestor a/ --from b/ --to c/","isInternal":false,"tokens":184,"sizeBytes":799},{"name":"run-fns.md","path":"cmd/config/docs/commands/run-fns.md","rawUrl":"https://raw.githubusercontent.com/kubernetes-sigs/kustomize/HEAD/cmd/config/docs/commands/run-fns.md","title":"Command: /run-fns","category":"command-prompt","format":"markdown","content":"## run\n\n[Alpha] Reconcile config functions to Resources.\n\n### Synopsis\n\n[Alpha] Reconcile config functions to Resources.\n\nrun sequentially invokes all config functions in the directory, providing Resources\nin the directory as input to the first function, and writing the output of the last\nfunction back to the directory.\n\nThe ordering of functions is determined by the order they are encountered when walking the\ndirectory.  To clearly specify an ordering of functions, multiple functions may be\ndeclared in the same file, separated by '---' (the functions will be invoked in the\norder they appear in the file).\n\n#### Arguments:\n\n  DIR:\n    Path to local directory.\n\n#### Config Functions:\n\n  Config functions are specified as Kubernetes types containing a metadata.annotations.[config.kubernetes.io/function]\n  field specifying an image for the container to run.  This image tells run how to invoke the container.\n\n  Example config function:\n\n\t# in file example/fn.yaml\n\tapiVersion: fn.example.com/v1beta1\n\tkind: ExampleFunctionKind\n\tmetadata:\n\t  annotations:\n\t    config.kubernetes.io/function: |\n\t      container:\n\t        # function is invoked as a container running this image\n\t        image: gcr.io/example/examplefunction:v1.0.1\n\t    config.kubernetes.io/local-config: \"true\" # tools should ignore this\n\tspec:\n\t  configField: configValue\n\n  In the preceding example, 'kustomize fn run example/' would identify the function by\n  the metadata.annotations.[config.kubernetes.io/function] field.  It would then write all Resources in the directory to\n  a container stdin (running the gcr.io/example/examplefunction:v1.0.1 image).  It\n  would then write the container stdout back to example/, replacing the directory\n  file contents.\n\n  See `kustomize docs-fn` for more details on writing functions.\n\n### Examples\n\nkustomize fn run example/\n","isInternal":false,"tokens":400,"sizeBytes":1844},{"name":"set.md","path":"cmd/config/docs/commands/set.md","rawUrl":"https://raw.githubusercontent.com/kubernetes-sigs/kustomize/HEAD/cmd/config/docs/commands/set.md","title":"Command: /set","category":"command-prompt","format":"markdown","content":"## set\n\n[Alpha] Set values on Resources fields values.\n\n### Synopsis\n\nSet values on Resources fields.  May set either the complete or partial field value.\n\n`set` identifies setters using field metadata published as OpenAPI extensions.\n`set` parses both the Kubernetes OpenAPI, as well OpenAPI published inline in\nthe configuration as comments.\n\n`set` maybe be used to:\n\n- edit configuration programmatically from the cli\n- create reusable bundles of configuration with custom setters\n\n  DIR\n\n    A directory containing Resource configuration.\n\n  NAME\n\n    Optional.  The name of the setter to perform or display.\n\n  VALUE\n\n    Optional.  The value to set on the field.\n\n\nTo print the possible setters for the Resources in a directory, run\n`list-setters` on a directory -- e.g. `kustomize cfg list-setters DIR/`.\n\n#### Tips\n\n- A description of the value may be specified with `--description`.\n- The last setter for the field's value may be defined with `--set-by`.\n- Create custom setters on Resources, Kustomization.yaml's, patches, etc\n\nThe description and setBy fields are left unmodified unless specified with flags.\n\nTo create a custom setter for a field see: `kustomize help cfg create-setter`\n\n### Examples\n\n  Resource YAML: Name Prefix Setter\n\n    # DIR/resources.yaml\n    ...\n    metadata:\n        name: PREFIX-app1 # {\"type\":\"string\",\"x-kustomize\":{\"setter\":[{\"name\":\"name-prefix\",\"value\":\"PREFIX\"}]}}\n    ...\n    ---\n    ...\n    metadata:\n        name: PREFIX-app2 # {\"type\":\"string\",\"x-kustomize\":{\"setter\":[{\"name\":\"name-prefix\",\"value\":\"PREFIX\"}]}}\n    ...\n\n  List setters: Show the possible setters\n\n    $ config list-setters DIR/\n        NAME      DESCRIPTION   VALUE     TYPE     COUNT   SETBY  \n    name-prefix   ''            PREFIX    string   2\n\n  Perform set: set a new value, owner and description\n\n    $ kustomize cfg set DIR/ name-prefix \"test\" --description \"test environment\" --set-by \"dev\"\n    set 2 values\n\n  List setters: Show the new values\n\n    $ config list-setters DIR/\n        NAME      DESCRIPTION         VALUE     TYPE     COUNT     SETBY \n    name-prefix   'test environment'   test     string   2          dev\n\n  New Resource YAML:\n\n    # DIR/resources.yaml\n    ...\n    metadata:\n        name: test-app1 # {\"description\":\"test environment\",\"type\":\"string\",\"x-kustomize\":{\"setBy\":\"dev\",\"setter\":[{\"name\":\"name-prefix\",\"value\":\"test\"}]}}\n    ...\n    ---\n    ...\n    metadata:\n        name: test-app2 # {\"description\":\"test environment\",\"type\":\"string\",\"x-kustomize\":{\"setBy\":\"dev\",\"setter\":[{\"name\":\"name-prefix\",\"value\":\"test\"}]}}\n    ...\n","isInternal":false,"tokens":601,"sizeBytes":2577},{"name":"sink.md","path":"cmd/config/docs/commands/sink.md","rawUrl":"https://raw.githubusercontent.com/kubernetes-sigs/kustomize/HEAD/cmd/config/docs/commands/sink.md","title":"Command: /sink","category":"command-prompt","format":"markdown","content":"## sink\n\n[Alpha] Implement a Sink by writing input to a local directory.\n\n### Synopsis\n\n[Alpha] Implement a Sink by writing input to a local directory.\n\n    kustomize fn sink [DIR]\n\n  DIR:\n    Path to local directory.  If unspecified, sink will write to stdout as if it were a single file.\n\n`sink` writes its input to a directory\n\n### Examples\n\n    kustomize fn source DIR/ | your-function | kustomize fn sink DIR/\n","isInternal":false,"tokens":101,"sizeBytes":415},{"name":"source.md","path":"cmd/config/docs/commands/source.md","rawUrl":"https://raw.githubusercontent.com/kubernetes-sigs/kustomize/HEAD/cmd/config/docs/commands/source.md","title":"Command: /source","category":"command-prompt","format":"markdown","content":"## source\n\n[Alpha] Implement a Source by reading a local directory.\n\n### Synopsis\n\n[Alpha] Implement a Source by reading a local directory.\n\n    kustomize fn source DIR...\n\n  DIR:\n    One or more paths to local directories.  Contents from directories will be concatenated.\n    If no directories are provided, source will read from stdin as if it were a single file.\n\n`source` emits configuration to act as input to a function\n\n### Examples\n\n    # emity configuration directory as input source to a function\n    kustomize fn source DIR/\n\n    kustomize fn source DIR/ | your-function | kustomize fn sink DIR/\n","isInternal":false,"tokens":134,"sizeBytes":607},{"name":"tree.md","path":"cmd/config/docs/commands/tree.md","rawUrl":"https://raw.githubusercontent.com/kubernetes-sigs/kustomize/HEAD/cmd/config/docs/commands/tree.md","title":"Command: /tree","category":"command-prompt","format":"markdown","content":"## tree\n\n[Alpha] Display Resource structure from a directory or stdin.\n\n### Synopsis\n\n[Alpha] Display Resource structure from a directory or stdin.\n\nkustomize cfg tree may be used to print Resources in a directory or cluster, preserving structure\n\nArgs:\n\n  DIR:\n    Path to local directory directory.\n\nResource fields may be printed as part of the Resources by specifying the fields as flags.\n\nkustomize cfg tree has built-in support for printing common fields, such as replicas, container images,\ncontainer names, etc.\n\nkustomize cfg tree supports printing arbitrary fields using the '--field' flag.\n\nBy default, kustomize cfg tree uses Resource graph structure if any relationships between resources (ownerReferences)\nare detected, as is typically the case when printing from a cluster. Otherwise, directory graph structure is used. The\ngraph structure can also be selected explicitly using the '--graph-structure' flag.\n\n### Examples\n\n    # print Resources using directory structure\n    kustomize cfg tree my-dir/\n\n    # print replicas, container name, and container image and fields for Resources\n    kustomize cfg tree my-dir --replicas --image --name\n\n    # print all common Resource fields\n    kustomize cfg tree my-dir/ --all\n\n    # print the \"foo\"\" annotation\n    kustomize cfg tree my-dir/ --field \"metadata.annotations.foo\"\n\n    # print the \"foo\"\" annotation\n    kubectl get all -o yaml | kustomize cfg tree \\\n      --field=\"status.conditions[type=Completed].status\"\n\n    # print live Resources from a cluster using owners for graph structure\n    kubectl get all -o yaml | kustomize cfg tree --replicas --name --image\n\n    # print live Resources with status condition fields\n    kubectl get all -o yaml | kustomize cfg tree \\\n      --name --image --replicas \\\n      --field=\"status.conditions[type=Completed].status\" \\\n      --field=\"status.conditions[type=Complete].status\" \\\n      --field=\"status.conditions[type=Ready].status\" \\\n      --field=\"status.conditions[type=ContainersReady].status\"\n","isInternal":false,"tokens":437,"sizeBytes":2006}],"systemPromptSnippet":"<yakaai_skills repo=\"kubernetes-sigs/kustomize\">\n<!-- File: cmd/config/docs/commands/annotate.md (Tokens: ~92 | Category: command-prompt) -->\n## annotate\n\n[Alpha] Set an annotation on Resources.\n\n### Synopsis\n\n[Alpha]  Set an annotation on Resources.\n\n  DIR:\n    Path to local directory.\n\n### Examples\n\n    kustomize cfg annotate my-dir/ --kv foo=bar\n\n    kustomize cfg annotate my-dir/ --kv foo=bar --kv a=b\n\n    kustomize cfg annotate my-dir/ --kv foo=bar --kind Deployment --name foo\n\n<!-- File: cmd/config/docs/commands/cat.md (Tokens: ~125 | Category: command-prompt) -->\n## cat\n\n[Alpha] Print Resource Config from a local directory.\n\n### Synopsis\n\n[Alpha]  Print Resource Config from a local directory.\n\n  DIR:\n    Path to local directory.\n\n### Examples\n\n    # print Resource config from a directory\n    kustomize cfg cat my-dir/\n\n    # wrap Resource config from a directory in an ResourceList\n    kustomize cfg cat my-dir/ --wrap-kind ResourceList --wrap-version config.kubernetes.io/v1alpha1 --function-config fn.yaml\n\n    # unwrap Resource config from a directory in an ResourceList\n    ... | kustomize cfg cat\n\n<!-- File: cmd/config/docs/commands/completion.md (Tokens: ~154 | Category: command-prompt) -->\n## completion\n\nGenerate shell completion.\n\n### Synopsis\n\nGenerate shell completion for `kustomize` -- supports bash, zsh, fish and powershell.\n\n### Examples\n\n    # load completion for Bash\n    source <(kustomize completion bash)\n\n    # install for Bash in Linux\n    kustomize completion bash > /etc/bash_completion.d/kustomize\n\n    # install for Bash in MacOS\n    kustomize completion bash > /usr/local/etc/bash_completion.d/kustomize\n\n    # package for Bash\n    kustomize completion bash > /usr/share/bash-completion/completions/kustomize\n\n    # package for zsh\n    kustomize completion zsh > /usr/share/zsh/site-functions/_kustomize\n\n<!-- File: cmd/config/docs/commands/count.md (Tokens: ~58 | Category: command-prompt) -->\n## count\n\n[Alpha] Count Resources Config from a local directory.\n\n### Synopsis\n\n[Alpha] Count Resources Config from a local directory.\n\n  DIR:\n    Path to local directory.\n\n### Examples\n\n    # print Resource counts from a directory\n    kustomize cfg count my-dir/\n\n<!-- File: cmd/config/docs/commands/create-setter.md (Tokens: ~647 | Category: command-prompt) -->\n## create-setter\n\n[Alpha] Create a custom setter for a Resource field\n\n### Synopsis\n\nCreate a custom setter for a Resource field by inlining OpenAPI as comments.\n\n  DIR\n\n    A directory containing Resource configuration.\n\n  NAME\n\n    The name of the setter to create.\n\n  VALUE\n\n    The current value of the field, or a substring within the field.\n\n### Creating a Custom Setter\n\n**Given the YAML:**\n\n    # resource.yaml\n    apiVersion: v1\n    kind: Service\n    metadata:\n      ...\n    spec:\n      ...\n      ports:\n        ...\n      - name: http\n        port: 8080\n        ...\n\n**Create a new setter:**\n\n    # create a setter for ports\n    $ kustomize cfg set create DIR/ http-port 8080 --type \"integer\" --field \"port\"\n\n  Resources fields with a field name matching `--field` and field value matching `VALUE` will\n  have a line comment added marking this field as settable.\n\n**Newly modified YAML:**\n\n    # resource.yaml\n    apiVersion: v1\n    kind: Service\n    metadata:\n      ...\n    spec:\n      ...\n      ports:\n        ...\n      - name: http\n        port: 8080  # {\"type\":\"integer\",\"x-kustomize\":{\"partialFieldSetters\":[{\"name\":\"http-port\",\"value\":\"8080\"}]}}\n        ...\n\n  Setters may also be defined directly by editing the yaml and adding the comment.\n\nUsers may not set the field value using the `set` command:\n\n    # change the http-port value to 8081\n    $ kustomize cfg set DIR/ http-port 8081\n\n### Using default values\n\nThe default values for a setter may be:\n\n- valid field values (e.g. `8080` or `008080` for a port)\n- invalid values that adhere to the schema (e.g. `0000` for a port)\n- values that do not adhere to the schema (e.g. `[PORT]` for port)\n\nA setter may be for a substring of a full field:\n\n    $ kustomize cfg set create DIR/ image-tag v1.0.01 --type \"string\" --field \"image\"\n\n    image: gcr.io/example/app:v1.0.1 # # {\"type\":\"string\",\"x-kustomize\":{\"partialFieldSetters\":[{\"name\":\"image-tag\",\"value\":\"v1.0.1\"}]}}\n\nA single field value may have multiple setters applied to it for different parts of the field.\n\n### Examples\n\n    # create a setter for port fields matching \"8080\"\n    kustomize cfg create-setter DIR/ port 8080 --type \"integer\" --field port \\\n         --description \"default port used by the app\"\n\n    # create a setter for a substring of a field rather than the full field -- e.g. only the\n    # image tag, not the full image\n    kustomize cfg create-setter DIR/ image-tag v1.0.1 --type \"string\" \\\n        --field image --description \"current stable release\"\n\n<!-- File: cmd/config/docs/commands/delete-setter.md (Tokens: ~282 | Category: command-prompt) -->\n## delete-setter\n\n[Alpha] Delete a custom setter for a Resource field\n\n### Synopsis\n\nDelete a custom setter for a Resource field.\n\n  DIR\n\n    A directory containing Resource configuration.\n\n  NAME\n\n    The name of the setter to create.\n\n### Deleting a Custom Setter\n\n**Given the YAML:**\n\n    # resource.yaml\n    apiVersion: v1\n    kind: Service\n    metadata:\n      ...\n    spec:\n      ...\n      ports:\n        ...\n      - name: http\n        port: 8080  # {\"type\":\"integer\",\"x-kustomize\":{\"partialFieldSetters\":[{\"name\":\"http-port\",\"value\":\"8080\"}]}}\n        ...\n\n**Delete setter:**\n\n    # delete a setter for ports\n    $ kustomize cfg set create DIR/ http-port\n\ncomment will be removed for this field is not settable any more.\n\n**Newly modified YAML:**\n\n    # resource.yaml\n    apiVersion: v1\n    kind: Service\n    metadata:\n      ...\n    spec:\n      ...\n      ports:\n        ...\n      - name: http\n        port: 8080\n        ...\n\n\n### Deleting a setter used in substitution\n\nIf the setter is also used in substitution, it will ask you to delete the substitution first.\n\n\n### Examples\n\n    # delete a setter for port\n    kustomize cfg create-setter DIR/ port\n\n<!-- File: cmd/config/docs/commands/fmt.md (Tokens: ~304 | Category: command-prompt) -->\n## fmt\n\n[Alpha] Format yaml configuration files.\n\n### Synopsis\n\n[Alpha] Format yaml configuration files.\n\nFmt will format input by ordering fields and unordered list items in Kubernetes\nobjects.  Inputs may be directories, files or stdin, and their contents must\ninclude both apiVersion and kind fields.\n\n- Stdin inputs are formatted and written to stdout\n- File inputs (args) are formatted and written back to the file\n- Directory inputs (args) are walked, each encountered .yaml and .yml file\n  acts as an input\n\nFor inputs which contain multiple yaml documents separated by \\n---\\n,\neach document will be formatted and written back to the file in the original\norder.\n\nField ordering roughly follows the ordering defined in the source Kubernetes\nresource definitions (i.e. go structures), falling back on lexicographical\nsorting for unrecognized fields.\n\nUnordered list item ordering is defined for specific Resource types and\nfield paths.\n\n- .spec.template.spec.containers (by element name)\n- .webhooks.rules.operations (by element value)\n\n### Examples\n\n\t# format file1.yaml and file2.yml\n\tkustomize cfg fmt file1.yaml file2.yml\n\n\t# format all *.yaml and *.yml recursively traversing directories\n\tkustomize cfg fmt my-dir/\n\n\t# format kubectl output\n\tkubectl get -o yaml deployments | kustomize cfg fmt\n\n\t# format kustomize output\n\tkustomize build | kustomize cfg fmt\n\n<!-- File: cmd/config/docs/commands/grep.md (Tokens: ~238 | Category: command-prompt) -->\n## grep\n\n[Alpha] Search for matching Resources in a directory or from stdin\n\n### Synopsis\n\n[Alpha] Search for matching Resources in a directory or from stdin.\n\n  QUERY:\n    Query to match expressed as 'path.to.field=value'.\n    Maps and fields are matched as '.field-name' or '.map-key'\n    List elements are matched as '[list-elem-field=field-value]'\n    The value to match is expressed as '=value'\n    '.' as part of a key or value can be escaped as '\\.'\n\n  DIR:\n    Path to local directory.\n\n### Examples\n\n    # find Deployment Resources\n    kustomize cfg grep \"kind=Deployment\" my-dir/\n\n    # find Resources named nginx\n    kustomize cfg grep \"metadata.name=nginx\" my-dir/\n\n    # use tree to display matching Resources\n    kustomize cfg grep \"metadata.name=nginx\" my-dir/ | kustomize cfg tree\n\n    # look for Resources matching a specific container image\n    kustomize cfg grep \"spec.template.spec.containers[name=nginx].image=nginx:1\\.7\\.9\" my-dir/ | kustomize cfg tree\n\n<!-- File: cmd/config/docs/commands/init.md (Tokens: ~82 | Category: command-prompt) -->\n## init\n\n[Alpha] Initialize a directory with a Krmfile.\n\n### Synopsis\n\n[Alpha]  Initialize a directory with a Krmfile.\n\n  DIR:\n    Path to local directory.\n\n### Examples\n\n    # create a Krmfile in the local directory\n    kustomize cfg init\n\n    # create a Krmfile in my-dir/\n    kustomize cfg init my-dir/\n\n<!-- File: cmd/config/docs/commands/list-setters.md (Tokens: ~89 | Category: command-prompt) -->\n## set\n\n[Alpha] List setters for Resources.\n\n### Synopsis\n\nList setters for Resources.\n\n  DIR\n\n    A directory containing Resource configuration.\n\n  NAME\n\n    Optional.  The name of the setter to display.\n\n### Examples\n\n  Show setters:\n\n    $ kustomize cfg list-setters DIR/\n        NAME      DESCRIPTION   VALUE     TYPE     COUNT   SETBY  \n    name-prefix   ''            PREFIX    string   2\n\n<!-- File: cmd/config/docs/commands/merge.md (Tokens: ~145 | Category: command-prompt) -->\n## merge\n\n[Alpha] Merge Resource configuration files\n\n### Synopsis\n\n[Alpha] Merge Resource configuration files\n\nMerge reads Kubernetes Resource yaml configuration files from stdin or sources packages and write\nthe result to stdout or a destination package.\n\nResources are merged using the Resource [apiVersion, kind, name, namespace] as the key.  If any of\nthese are missing, merge will default the missing values to empty.\n\nResources specified later are high-precedence (the source) and Resources specified\nearlier are lower-precedence (the destination).\n\nFor information on merge rules, run:\n\n\tkustomize cfg docs merge\n\n### Examples\n\n    cat resources_and_patches.yaml | kustomize cfg merge > merged_resources.yaml\n\n<!-- File: cmd/config/docs/commands/merge3.md (Tokens: ~184 | Category: command-prompt) -->\n## merge3\n\n[Alpha] Merge diff of Resource configuration files into a destination (3-way)\n\n### Synopsis\n\n[Alpha] Merge diff of Resource configuration files into a destination (3-way)\n\nMerge3 performs a 3-way merge by applying the diff between 2 sets of Resources to a 3rd set.\n\nMerge3 may be for rebasing changes to a forked set of configuration -- e.g. compute the difference between the original\nset of Resources that was forked and an updated set of those Resources, then apply that difference to the fork.\n\nIf a field value differs between the ORIGINAL_DIR and UPDATED_DIR, the value from the UPDATED_DIR is taken and applied\nto the Resource in the DEST_DIR.\n\nFor information on merge rules, run:\n\n\tkustomize cfg docs-merge3\n\n### Examples\n\n    kustomize cfg merge3 --ancestor a/ --from b/ --to c/\n\n<!-- File: cmd/config/docs/commands/run-fns.md (Tokens: ~400 | Category: command-prompt) -->\n## run\n\n[Alpha] Reconcile config functions to Resources.\n\n### Synopsis\n\n[Alpha] Reconcile config functions to Resources.\n\nrun sequentially invokes all config functions in the directory, providing Resources\nin the directory as input to the first function, and writing the output of the last\nfunction back to the directory.\n\nThe ordering of functions is determined by the order they are encountered when walking the\ndirectory.  To clearly specify an ordering of functions, multiple functions may be\ndeclared in the same file, separated by '---' (the functions will be invoked in the\norder they appear in the file).\n\n#### Arguments:\n\n  DIR:\n    Path to local directory.\n\n#### Config Functions:\n\n  Config functions are specified as Kubernetes types containing a metadata.annotations.[config.kubernetes.io/function]\n  field specifying an image for the container to run.  This image tells run how to invoke the container.\n\n  Example config function:\n\n\t# in file example/fn.yaml\n\tapiVersion: fn.example.com/v1beta1\n\tkind: ExampleFunctionKind\n\tmetadata:\n\t  annotations:\n\t    config.kubernetes.io/function: |\n\t      container:\n\t        # function is invoked as a container running this image\n\t        image: gcr.io/example/examplefunction:v1.0.1\n\t    config.kubernetes.io/local-config: \"true\" # tools should ignore this\n\tspec:\n\t  configField: configValue\n\n  In the preceding example, 'kustomize fn run example/' would identify the function by\n  the metadata.annotations.[config.kubernetes.io/function] field.  It would then write all Resources in the directory to\n  a container stdin (running the gcr.io/example/examplefunction:v1.0.1 image).  It\n  would then write the container stdout back to example/, replacing the directory\n  file contents.\n\n  See `kustomize docs-fn` for more details on writing functions.\n\n### Examples\n\nkustomize fn run example/\n\n<!-- File: cmd/config/docs/commands/set.md (Tokens: ~601 | Category: command-prompt) -->\n## set\n\n[Alpha] Set values on Resources fields values.\n\n### Synopsis\n\nSet values on Resources fields.  May set either the complete or partial field value.\n\n`set` identifies setters using field metadata published as OpenAPI extensions.\n`set` parses both the Kubernetes OpenAPI, as well OpenAPI published inline in\nthe configuration as comments.\n\n`set` maybe be used to:\n\n- edit configuration programmatically from the cli\n- create reusable bundles of configuration with custom setters\n\n  DIR\n\n    A directory containing Resource configuration.\n\n  NAME\n\n    Optional.  The name of the setter to perform or display.\n\n  VALUE\n\n    Optional.  The value to set on the field.\n\n\nTo print the possible setters for the Resources in a directory, run\n`list-setters` on a directory -- e.g. `kustomize cfg list-setters DIR/`.\n\n#### Tips\n\n- A description of the value may be specified with `--description`.\n- The last setter for the field's value may be defined with `--set-by`.\n- Create custom setters on Resources, Kustomization.yaml's, patches, etc\n\nThe description and setBy fields are left unmodified unless specified with flags.\n\nTo create a custom setter for a field see: `kustomize help cfg create-setter`\n\n### Examples\n\n  Resource YAML: Name Prefix Setter\n\n    # DIR/resources.yaml\n    ...\n    metadata:\n        name: PREFIX-app1 # {\"type\":\"string\",\"x-kustomize\":{\"setter\":[{\"name\":\"name-prefix\",\"value\":\"PREFIX\"}]}}\n    ...\n    ---\n    ...\n    metadata:\n        name: PREFIX-app2 # {\"type\":\"string\",\"x-kustomize\":{\"setter\":[{\"name\":\"name-prefix\",\"value\":\"PREFIX\"}]}}\n    ...\n\n  List setters: Show the possible setters\n\n    $ config list-setters DIR/\n        NAME      DESCRIPTION   VALUE     TYPE     COUNT   SETBY  \n    name-prefix   ''            PREFIX    string   2\n\n  Perform set: set a new value, owner and description\n\n    $ kustomize cfg set DIR/ name-prefix \"test\" --description \"test environment\" --set-by \"dev\"\n    set 2 values\n\n  List setters: Show the new values\n\n    $ config list-setters DIR/\n        NAME      DESCRIPTION         VALUE     TYPE     COUNT     SETBY \n    name-prefix   'test environment'   test     string   2          dev\n\n  New Resource YAML:\n\n    # DIR/resources.yaml\n    ...\n    metadata:\n        name: test-app1 # {\"description\":\"test environment\",\"type\":\"string\",\"x-kustomize\":{\"setBy\":\"dev\",\"setter\":[{\"name\":\"name-prefix\",\"value\":\"test\"}]}}\n    ...\n    ---\n    ...\n    metadata:\n        name: test-app2 # {\"description\":\"test environment\",\"type\":\"string\",\"x-kustomize\":{\"setBy\":\"dev\",\"setter\":[{\"name\":\"name-prefix\",\"value\":\"test\"}]}}\n    ...\n\n<!-- File: cmd/config/docs/commands/sink.md (Tokens: ~101 | Category: command-prompt) -->\n## sink\n\n[Alpha] Implement a Sink by writing input to a local directory.\n\n### Synopsis\n\n[Alpha] Implement a Sink by writing input to a local directory.\n\n    kustomize fn sink [DIR]\n\n  DIR:\n    Path to local directory.  If unspecified, sink will write to stdout as if it were a single file.\n\n`sink` writes its input to a directory\n\n### Examples\n\n    kustomize fn source DIR/ | your-function | kustomize fn sink DIR/\n\n<!-- File: cmd/config/docs/commands/source.md (Tokens: ~134 | Category: command-prompt) -->\n## source\n\n[Alpha] Implement a Source by reading a local directory.\n\n### Synopsis\n\n[Alpha] Implement a Source by reading a local directory.\n\n    kustomize fn source DIR...\n\n  DIR:\n    One or more paths to local directories.  Contents from directories will be concatenated.\n    If no directories are provided, source will read from stdin as if it were a single file.\n\n`source` emits configuration to act as input to a function\n\n### Examples\n\n    # emity configuration directory as input source to a function\n    kustomize fn source DIR/\n\n    kustomize fn source DIR/ | your-function | kustomize fn sink DIR/\n\n<!-- File: cmd/config/docs/commands/tree.md (Tokens: ~437 | Category: command-prompt) -->\n## tree\n\n[Alpha] Display Resource structure from a directory or stdin.\n\n### Synopsis\n\n[Alpha] Display Resource structure from a directory or stdin.\n\nkustomize cfg tree may be used to print Resources in a directory or cluster, preserving structure\n\nArgs:\n\n  DIR:\n    Path to local directory directory.\n\nResource fields may be printed as part of the Resources by specifying the fields as flags.\n\nkustomize cfg tree has built-in support for printing common fields, such as replicas, container images,\ncontainer names, etc.\n\nkustomize cfg tree supports printing arbitrary fields using the '--field' flag.\n\nBy default, kustomize cfg tree uses Resource graph structure if any relationships between resources (ownerReferences)\nare detected, as is typically the case when printing from a cluster. Otherwise, directory graph structure is used. The\ngraph structure can also be selected explicitly using the '--graph-structure' flag.\n\n### Examples\n\n    # print Resources using directory structure\n    kustomize cfg tree my-dir/\n\n    # print replicas, container name, and container image and fields for Resources\n    kustomize cfg tree my-dir --replicas --image --name\n\n    # print all common Resource fields\n    kustomize cfg tree my-dir/ --all\n\n    # print the \"foo\"\" annotation\n    kustomize cfg tree my-dir/ --field \"metadata.annotations.foo\"\n\n    # print the \"foo\"\" annotation\n    kubectl get all -o yaml | kustomize cfg tree \\\n      --field=\"status.conditions[type=Completed].status\"\n\n    # print live Resources from a cluster using owners for graph structure\n    kubectl get all -o yaml | kustomize cfg tree --replicas --name --image\n\n    # print live Resources with status condition fields\n    kubectl get all -o yaml | kustomize cfg tree \\\n      --name --image --replicas \\\n      --field=\"status.conditions[type=Completed].status\" \\\n      --field=\"status.conditions[type=Complete].status\" \\\n      --field=\"status.conditions[type=Ready].status\" \\\n      --field=\"status.conditions[type=ContainersReady].status\"\n</yakaai_skills>"}