Skip to content

Commit

Permalink
Update fn run docs. (#1361)
Browse files Browse the repository at this point in the history
- Include example for printing a modification to stdout
- Clarify that directory is an optional argument
  • Loading branch information
runewake2 committed Jan 15, 2021
1 parent ed05661 commit 1391548
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
6 changes: 5 additions & 1 deletion internal/docs/generated/fndocs/docs.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 7 additions & 1 deletion site/content/en/reference/fn/run/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ reference for advanced usecases.
<!--mdtogo:Long-->

```sh
kpt fn run DIR [flags]
kpt fn run [DIR] [flags]
```

If the container exits with non-zero status code, run will fail and print the
Expand Down Expand Up @@ -65,6 +65,12 @@ kpt fn run DIR/ --fn-path FUNCTIONS_DIR/
kpt fn run DIR/
```
```sh
# pipe a resource from stdin and execute a function against it.
# print the results to stdout
kpt fn source . | kpt fn run --image gcr.io/example.com/my-fn
```
<!--mdtogo-->
## Structured Results
Expand Down

0 comments on commit 1391548

Please sign in to comment.