Update documents from 'configuration' to 'fn'

This commit is contained in:
Carlos Ortiz García
2021-10-11 12:03:53 -05:00
parent 67c58ad4f4
commit 548f5ffca9
19 changed files with 60 additions and 54 deletions

View File

@@ -11,7 +11,7 @@ The function is implemented as an [image](image), and built using `make image`.
The template is implemented as a heredoc, which substitutes environment variables
into a static string.
This simple implementation uses `kustomize config run wrap --` to perform the
This simple implementation uses `kustomize fn run wrap --` to perform the
heavy lifting of implementing the function interface.
- parse functionConfig from stdin into environment variables
@@ -22,7 +22,7 @@ heavy lifting of implementing the function interface.
The function is invoked by authoring a [local Resource](local-resource)
with `metadata.annotations.[config.kubernetes.io/function]` and running:
kustomize config run local-resource/
kustomize fn run local-resource/
This generates the `local-resource/config` directory containing the template output.
@@ -36,7 +36,7 @@ This generates the `local-resource/config` directory containing the template out
Run the config with:
kustomize config run local-resource/
kustomize fn run local-resource/
This will create the directory
@@ -45,6 +45,6 @@ This will create the directory
Add an annotation to the StatefulSet Resource and change the replica count of the
`kind: CockroachDB` Resource in `example-use.yaml`. Rerun the template:
kustomize config run local-resource/
kustomize fn run local-resource/
The replica count should be updated, but your annotation should remain.

View File

@@ -3,18 +3,18 @@
# SPDX-License-Identifier: Apache-2.0
# use `kustomize config run wrap` to parse the container stdin into
# use `kustomize fn run wrap` to parse the container stdin into
# environment variables, and to merge the template output into the
# input Resources.
if [ -z ${WRAPPED} ]; then
export WRAPPED=true
kustomize config run wrap -- $0
kustomize fn run wrap -- $0
exit $?
fi
# this is the template for a cockroachdb instance
# environment variables are parsed from the input functionConfig by
# `kustomize config run wrap`
# `kustomize fn run wrap`
cat <<End-of-message
apiVersion: v1
kind: Service

View File

@@ -1,7 +1,7 @@
# Copyright 2019 The Kubernetes Authors.
# SPDX-License-Identifier: Apache-2.0
# call `kustomize config run` on a directory containing this file
# call `kustomize fn run` on a directory containing this file
apiVersion: examples.config.kubernetes.io/v1beta1
kind: CockroachDB
metadata: