`render`
render executes the pipeline of functions on resources in the package and
writes the output to the local filesystem in-place.
render executes the pipelines in the package hierarchy in a depth-first order.
For example, if a package A contains subpackage B, then the pipeline in B is
executed on resources in B and then the pipeline in A is executed on resources
in A and the output of the pipeline from package B. The output of the pipeline
from A is then written to the local filesystem in-place.
render formats the resources before writing them to the local filesystem.
If any of the functions in the pipeline fails, then the entire pipeline is aborted and the local filesystem is left intact.
Refer to the Declarative Functions Execution for more details.
Synopsis #
Args #
Flags #
Environment Variables #
Examples #
# Render the package in current directory
$ kpt fn render
# Render the package in current directory and save results in my-results-dir
$ kpt fn render --results-dir my-results-dir
# Render my-package-dir
$ kpt fn render my-package-dir
# Render the package in current directory and write output resources to another DIR
$ kpt fn render -o path/to/dir
# Render resources in current directory and write unwrapped resources to stdout
# which can be piped to kubectl apply
$ kpt fn render -o unwrap | kpt fn eval -i ghcr.io/kptdev/krm-functions-catalog/remove-local-config-resources:latest -o unwrap - | kubectl apply -f -
# Render resources in current directory, write the wrapped resources
# to stdout which are piped to 'set-annotations' function,
# the transformed resources are written to another directory
$ kpt fn render -o stdout \
| kpt fn eval - -i ghcr.io/kptdev/krm-functions-catalog/set-annotations:latest -o path/to/dir -- foo=bar
# Render my-package-dir with podman as runtime for functions
$ KRM_FN_RUNTIMETIME=podman kpt fn render my-package-dir
# Render my-package-dir with network access enabled for functions
$ kpt fn render --allow-network