mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-07-01 18:30:15 +00:00
Remove extraneous whitespace.
make all (generate docs) Update examples in cmd docs. make all (generate docs) functions/examples: Whitespace cleanup. functions/examples: Fix some example commands.
This commit is contained in:
@@ -9,9 +9,9 @@ var ConfigFnLong = `# Configuration Functions API Semantics
|
||||
Configuration Functions are functions packaged as executables in containers which enable
|
||||
**shift-left practices**. They configure applications and infrastructure through
|
||||
Kubernetes style Resource Configuration, but run locally pre-commit.
|
||||
|
||||
|
||||
Configuration functions enable shift-left practices (client-side) through:
|
||||
|
||||
|
||||
- Pre-commit / delivery validation and linting of configuration
|
||||
- e.g. Fail if any containers don't have PodSecurityPolicy or CPU / Memory limits
|
||||
- Implementation of abstractions as client actuated APIs (e.g. templating)
|
||||
@@ -23,7 +23,7 @@ var ConfigFnLong = `# Configuration Functions API Semantics
|
||||
Type, annotations, etc.
|
||||
|
||||
Performing these on the client rather than the server enables:
|
||||
|
||||
|
||||
- Configuration to be reviewed prior to being sent to the API server
|
||||
- Configuration to be validated as part of the CD pipeline
|
||||
- Configuration for Resources to validated holistically rather than individually
|
||||
@@ -36,14 +36,14 @@ var ConfigFnLong = `# Configuration Functions API Semantics
|
||||
- Compose generation, injection, validation together
|
||||
|
||||
Configuration Functions are implemented as executable programs published in containers which:
|
||||
|
||||
|
||||
- Accept as input (stdin):
|
||||
- A list of Resource Configuration
|
||||
- A Function Configuration (to configure the function itself)
|
||||
- Emit as output (stdout + exit):
|
||||
- A list of Resource Configuration
|
||||
- An exit code for success / failure
|
||||
|
||||
|
||||
### Function Specification
|
||||
|
||||
- Functions **SHOULD** be published as container images containing a ` + "`" + `CMD` + "`" + ` invoking an executable.
|
||||
@@ -71,7 +71,7 @@ var ConfigFnLong = `# Configuration Functions API Semantics
|
||||
- contains ` + "`" + `functionConfig` + "`" + ` field -- a single item with the configuration for the function itself
|
||||
|
||||
Example ` + "`" + `ResourceList` + "`" + ` Input:
|
||||
|
||||
|
||||
apiVersion: config.kubernetes.io/v1alpha1
|
||||
kind: ResourceList
|
||||
functionConfig:
|
||||
@@ -106,7 +106,7 @@ var ConfigFnLong = `# Configuration Functions API Semantics
|
||||
- contains ` + "`" + `items` + "`" + ` field, same as ` + "`" + `List.items` + "`" + `
|
||||
|
||||
Example ` + "`" + `ResourceList` + "`" + ` Output:
|
||||
|
||||
|
||||
apiVersion: config.kubernetes.io/v1alpha1
|
||||
kind: ResourceList
|
||||
items:
|
||||
@@ -206,7 +206,7 @@ var ConfigFnLong = `# Configuration Functions API Semantics
|
||||
|
||||
#### ` + "`" + `Dockerfile` + "`" + `
|
||||
|
||||
` + "`" + `Dockerfile` + "`" + ` installs ` + "`" + `kustomize config` + "`" + ` 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
|
||||
@@ -238,11 +238,11 @@ Following is an example of running the ` + "`" + `kustomize config run` + "`" +
|
||||
- ` + "`" + `configFn.container.image` + "`" + `: the image to use for this API
|
||||
- ` + "`" + `annotations[config.kubernetes.io/local-config]` + "`" + `: mark this as not a Resource that should
|
||||
be applied
|
||||
|
||||
|
||||
#### ` + "`" + `kustomize config run dir/` + "`" + ` (Output)
|
||||
|
||||
` + "`" + `dir/my-instance_deployment.yaml` + "`" + ` contains the Deployment:
|
||||
|
||||
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
@@ -284,8 +284,7 @@ Following is an example of running the ` + "`" + `kustomize config run` + "`" +
|
||||
name: http
|
||||
selector:
|
||||
app: nginx
|
||||
instance: my-instance
|
||||
`
|
||||
instance: my-instance`
|
||||
|
||||
var ConfigIoLong = `# Configuration IO API Semantics
|
||||
|
||||
@@ -330,9 +329,9 @@ var ConfigIoLong = `# Configuration IO API Semantics
|
||||
rather than a remote Resource. e.g. The ` + "`" + `Kustomization` + "`" + ` config in a ` + "`" + `kustomization.yaml` + "`" + `
|
||||
**SHOULD** contain this annotation so that tools know it is not intended to be sent to
|
||||
the Kubernetes api server.
|
||||
|
||||
|
||||
Example:
|
||||
|
||||
|
||||
metadata:
|
||||
annotations:
|
||||
config.kubernetes.io/local-config: "true"`
|
||||
@@ -362,7 +361,7 @@ var Merge2Long = `# Merge (2-way)
|
||||
- if the field is present in both the src and dest, and the src value is
|
||||
` + "`" + `null` + "`" + `, the field is removed from the dest
|
||||
- if the field is present in both the src and dest, the value is recursively merged
|
||||
- example src: ` + "`" + `{'key1': 'value1', 'key2': 'value2'}` + "`" + `,
|
||||
- example src: ` + "`" + `{'key1': 'value1', 'key2': 'value2'}` + "`" + `,
|
||||
dest: ` + "`" + `{'key2': 'value0', 'key3': 'value3'}` + "`" + `
|
||||
=> result: ` + "`" + `{'key1': 'value1', 'key2': 'value2', 'key3': 'value3'}` + "`" + `
|
||||
|
||||
|
||||
Reference in New Issue
Block a user