Skip to content

Commit

Permalink
batch example
Browse files Browse the repository at this point in the history
Signed-off-by: Sertac Ozercan <sozercan@gmail.com>
  • Loading branch information
sozercan committed Nov 23, 2021
1 parent 5667046 commit b8250ae
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions website/docs/externaldata.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,11 @@ External data adds a [custom OPA built-in function](https://www.openpolicyagent.
- `Provider`: the name of the provider to query
- `Keys`: the list of keys to send to the provider

e.g.,
```rego
# build a list of keys containing images for batching
my-list := [img | img = input.review.object.spec.template.spec.containers[_].image]
# send external data request
response := external_data({"provider": "my-provider", "keys": my-list})
```
Expand Down

0 comments on commit b8250ae

Please sign in to comment.