Skip to content

Commit

Permalink
docs: reference added for allow-network option in render
Browse files Browse the repository at this point in the history
  • Loading branch information
droot committed Jul 18, 2023
1 parent 6b84a26 commit 390ca66
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
4 changes: 2 additions & 2 deletions commands/fn/render/cmdrender.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ func NewRunner(ctx context.Context, parent string) *Runner {

c.Flags().BoolVar(&r.RunnerOptions.AllowExec, "allow-exec", r.RunnerOptions.AllowExec,
"allow binary executable to be run during pipeline execution.")
c.Flags().BoolVar(
&r.RunnerOptions.AllowNetwork, "allow-network", false, "allow functions to access network during pipeline execution.")
c.Flags().BoolVar(&r.RunnerOptions.AllowNetwork, "allow-network", false,
"allow functions to access network during pipeline execution.")
c.Flags().BoolVar(&r.RunnerOptions.AllowWasm, "allow-alpha-wasm", r.RunnerOptions.AllowWasm,
"allow wasm to be used during pipeline execution.")
cmdutil.FixDocs("kpt", parent, c)
Expand Down
10 changes: 10 additions & 0 deletions site/reference/cli/fn/render/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ PKG_PATH:
can perform privileged operations on your system, so ensure that binaries
referred in the pipeline are trusted and safe to execute.
--allow-network:
Allow functions to access network during pipeline execution. If unspecified,
`false` will be the default. Note that this is applicable for container
based functions only.
--image-pull-policy:
If the image should be pulled before rendering the package(s). It can be set
to one of always, ifNotPresent, never. If unspecified, always will be the
Expand Down Expand Up @@ -123,6 +128,11 @@ $ kpt fn render -o stdout \
$ KPT_FN_RUNTIME=podman kpt fn render my-package-dir
```

```shell
# Render my-package-dir with network access enabled for functions
$ kpt fn render --allow-network
```

<!--mdtogo-->

[declarative functions execution]:
Expand Down

0 comments on commit 390ca66

Please sign in to comment.