forked from kptdev/krm-functions-catalog
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocs.go
More file actions
45 lines (35 loc) · 1.59 KB
/
docs.go
File metadata and controls
45 lines (35 loc) · 1.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
// Code generated by "mdtogo"; DO NOT EDIT.
package generated
var SetLabelsShort = `The ` + "`" + `set-labels` + "`" + ` function adds a list of labels to all resources. It's a common
practice to add a set of labels for all the resources in a package. Kubernetes
has some [recommended labels].
For example, labels can be used in the following scenarios:
- Identify the KRM resources by querying their labels.
- Set labels for all resources within a package (e.g. environment=staging).`
var SetLabelsLong = `
There are 2 kinds of ` + "`" + `functionConfig` + "`" + ` supported by this function:
- ` + "`" + `ConfigMap` + "`" + `
- A custom resource of kind ` + "`" + `SetLabels` + "`" + `
To use a ` + "`" + `ConfigMap` + "`" + ` as the ` + "`" + `functionConfig` + "`" + `, the desired labels must be
specified in the ` + "`" + `data` + "`" + ` field.
To add 2 labels ` + "`" + `color: orange` + "`" + ` and ` + "`" + `fruit: apple` + "`" + ` to all resources, we use the
following ` + "`" + `functionConfig` + "`" + `:
apiVersion: v1
kind: ConfigMap
metadata:
name: my-config
data:
color: orange
fruit: apple
To use a ` + "`" + `SetLabels` + "`" + ` custom resource as the ` + "`" + `functionConfig` + "`" + `, the desired labels
must be specified in the ` + "`" + `labels` + "`" + ` field.
To add 2 labels ` + "`" + `color: orange` + "`" + ` and ` + "`" + `fruit: apple` + "`" + ` to all built-in resources, we use the
following ` + "`" + `functionConfig` + "`" + `:
apiVersion: fn.kpt.dev/v1alpha1
kind: SetLabels
metadata:
name: my-config
labels:
color: orange
fruit: apple
`