Skip to content

Commit

Permalink
fix typos
Browse files Browse the repository at this point in the history
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
  • Loading branch information
JimBugwadia committed Oct 19, 2021
1 parent f753cfa commit 4d6d718
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion content/en/docs/Writing policies/mutate.md
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ patchStrategicMerge:

When a `foreach` is processed, the Kyverno engine will evaluate `list` as a JMESPath expression to retrieve zero or more sub-elements for further processing.

A variable `element` is added to the processing context on each interation. This allows referencing data in the element using `element.<name>` where name is the attribute name. For example, using the list `request.object.spec.containers` when the `request.object` is a Pod allows referencing the container image as `element.name` withing a `foreach`.
A variable `element` is added to the processing context on each iteration. This allows referencing data in the element using `element.<name>` where name is the attribute name. For example, using the list `request.object.spec.containers` when the `request.object` is a Pod allows referencing the container image as `element.image` within a `foreach`.

Each `foreach` declaration can optionally contain the following declarations:
- [Context](/docs/writing-policies/external-data-sources/): to add additional external data only available per loop iteration.
Expand Down
2 changes: 1 addition & 1 deletion content/en/docs/Writing policies/validate.md
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ list: request.object.spec.containers

When a `foreach` is processed, the Kyverno engine will evaluate `list` as a JMESPath expression to retrieve zero or more sub-elements for further processing.

A variable `element` is added to the processing context on each interation. This allows referencing data in the element using `element.<name>` where name is the attribute name. For example, using the list `request.object.spec.containers` when the `request.object` is a Pod allows referencing the container image as `element.name` withing a `foreach`.
A variable `element` is added to the processing context on each iteration. This allows referencing data in the element using `element.<name>` where name is the attribute name. For example, using the list `request.object.spec.containers` when the `request.object` is a Pod allows referencing the container image as `element.image` within a `foreach`.

The following child declarations are permitted in a `foreach`:
- [Patterns](/docs/writing-policies/validate/#patterns)
Expand Down

0 comments on commit 4d6d718

Please sign in to comment.