Update cmd/config docs from using yaml to using kustomize config

This commit is contained in:
Phillip Wittrock
2019-11-27 11:59:45 -08:00
parent 1a9d62617e
commit 7ce1f7e95a
12 changed files with 78 additions and 72 deletions

View File

@@ -59,7 +59,7 @@ var ConfigFnLong = `# Configuration Functions API Semantics
generated Resources -- e.g. 1. the function generates a Deployment, but doesn't
specify ` + "`" + `cpu` + "`" + `, 2. the user sets the ` + "`" + `cpu` + "`" + ` on the generated Resource, 3. the
function should keep the ` + "`" + `cpu` + "`" + ` when regenerating the Resource a second time.
- Functions **SHOULD** be usable outside ` + "`" + `kyaml run-fns` + "`" + ` -- e.g. though pipeline
- Functions **SHOULD** be usable outside ` + "`" + `kustomize config run-fns` + "`" + ` -- e.g. though pipeline
mechanisms such as Tekton.
#### Input Format
@@ -126,7 +126,8 @@ var ConfigFnLong = `# Configuration Functions API Semantics
#### Container Environment
When run by ` + "`" + `kyaml run-fns` + "`" + `, functions are run in containers with the following environment:
When run by ` + "`" + `kustomize config run-fns` + "`" + `, functions are run in containers with the
following environment:
- Network: ` + "`" + `none` + "`" + `
- User: ` + "`" + `nobody` + "`" + `
@@ -152,8 +153,8 @@ var ConfigFnLong = `# Configuration Functions API Semantics
4. Format the output
#!/bin/bash
# script must run wrapped by kyaml for parsing input
# the functionConfig into env vars
# script must run wrapped by ` + "`" + `kustomize config run-fns wrap` + "`" + `
# for parsing input the functionConfig into env vars
if [ -z ${WRAPPED} ]; then
export WRAPPED=true
config run-fns wrap -- $0
@@ -205,7 +206,7 @@ var ConfigFnLong = `# Configuration Functions API Semantics
#### ` + "`" + `Dockerfile` + "`" + `
` + "`" + `Dockerfile` + "`" + ` installs ` + "`" + `kyaml` + "`" + ` and copies the script into the container image.
` + "`" + `Dockerfile` + "`" + ` installs ` + "`" + `kustomize config` + "`" + ` and copies the script into the container image.
FROM golang:1.13-stretch
RUN go get sigs.k8s.io/kustomize/cmd/config
@@ -215,7 +216,7 @@ var ConfigFnLong = `# Configuration Functions API Semantics
### Example Function Usage
Following is an example of running the ` + "`" + `kyaml run-fns` + "`" + ` using the preceding API.
Following is an example of running the ` + "`" + `kustomize config run-fns` + "`" + ` using the preceding API.
#### ` + "`" + `nginx.yaml` + "`" + ` (Input)
@@ -238,7 +239,7 @@ Following is an example of running the ` + "`" + `kyaml run-fns` + "`" + ` using
- ` + "`" + `annotations[config.kubernetes.io/local-config]` + "`" + `: mark this as not a Resource that should
be applied
#### ` + "`" + `kyaml run-fns dir/` + "`" + ` (Output)
#### ` + "`" + `kustomize config run-fns dir/` + "`" + ` (Output)
` + "`" + `dir/my-instance_deployment.yaml` + "`" + ` contains the Deployment: