mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-12 01:14:22 +00:00
Update cmd/config docs from using yaml to using kustomize config
This commit is contained in:
@@ -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:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user