@@ -58,18 +58,6 @@ fn-args:
58
58
By default, container function is executed as `nobody` user. You may want to use
59
59
this flag to run higher privilege operations such as mounting the local filesystem.
60
60
61
- --match-api-version:
62
- Select resources matching the given apiVersion.
63
-
64
- --match-kind
65
- Select resources matching the given kind.
66
-
67
- --match-name:
68
- Select resources matching the given name.
69
-
70
- --match-namespace:
71
- Select resources matching the given namespace.
72
-
73
61
--env, e:
74
62
List of local environment variables to be exported to the container function.
75
63
By default, none of local environment variables are made available to the
@@ -106,6 +94,18 @@ fn-args:
106
94
(DEPRECATED) include-meta-resources is no longer necessary because meta
107
95
resources are included by default with kpt version v1.0.0-beta.15+.
108
96
97
+ --match-api-version:
98
+ Select resources matching the given apiVersion.
99
+
100
+ --match-kind
101
+ Select resources matching the given kind.
102
+
103
+ --match-name:
104
+ Select resources matching the given name.
105
+
106
+ --match-namespace:
107
+ Select resources matching the given namespace.
108
+
109
109
--mount:
110
110
List of storage options to enable reading from the local filesytem. By default,
111
111
container functions can not access the local filesystem. It accepts the same options
@@ -125,11 +125,21 @@ fn-args:
125
125
3. OUT_DIR_PATH: output resources are written to provided directory.
126
126
The provided directory must not already exist.
127
127
128
+ --type, t;
129
+ Specify the function type. Accept value `mutator` (default), `validator`.
130
+ If used with `--save`, this flag will save the evaluated function to the corresponding
131
+ Kptfile section: `.pipeline.mutators` if type is `mutator`; `.pipeline.validators` if type
132
+ is `validator`.
133
+
128
134
--results-dir:
129
135
Path to a directory to write structured results. Directory will be created if
130
136
it doesn't exist. Structured results emitted by the functions are aggregated and saved
131
137
to `results.yaml` file in the specified directory.
132
138
If not specified, no result files are written to the local filesystem.
139
+
140
+ --save, s:
141
+ Save the function image and fn-config to Kptfile. Require ` + "`" + `--image` + "`" + `.
142
+
133
143
```
134
144
135
145
#### Environment Variables
@@ -162,6 +172,16 @@ $ kpt fn eval DIR -i gcr.io/example.com/my-fn --fn-config my-fn-config
162
172
$ kpt fn eval DIR -i gcr.io/example.com/my-fn:v1.0.0 -- foo=bar
163
173
```
164
174
175
+ ``` shell
176
+ # execute container my-fn and save it to Kptfile `pipeline.mutators` (Default) list.
177
+ $ kpt fn eval DIR -s -i gcr.io/example.com/my-fn:v1.0.0 -- foo=bar
178
+ ```
179
+
180
+ ``` shell
181
+ # execute container my-fn and save it to Kptfile `pipeline.validators` list.
182
+ $ kpt fn eval DIR -s -t validator -i gcr.io/example.com/my-fn:v1.0.0 -- foo=bar
183
+ ```
184
+
165
185
``` shell
166
186
# execute executable my-fn on the resources in DIR directory and
167
187
# write output back to DIR
0 commit comments