Skip to content

Commit

Permalink
Update content/en/docs/reference/access-authn-authz/validating-admiss…
Browse files Browse the repository at this point in the history
…ion-policy.md

Co-authored-by: Qiming Teng <[email protected]>
  • Loading branch information
jiahuif and tengqm authored Apr 3, 2023
1 parent a726bc4 commit 4716fc7
Showing 1 changed file with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -414,9 +414,14 @@ the evaluation result will be discarded and the static message will be used if p
Note that static message is validated against multi-line strings.
### Type checking
When a policy definition is created or updated, the validation process parses the expressions it contains and reports any syntax errors, rejecting the definition if any errors are found.
Afterward, the referred variables are checked for type errors, including missing fields and type confusion, against the matched types of `spec.matchConstraints`.
The result of type checking can be retrieved from `status.typeChecking`. The presence of `status.typeChecking` indicates the completion of type checking, and an empty `status.typeChecking` means that no errors were detected.
When a policy definition is created or updated, the validation process parses the expressions it contains
and reports any syntax errors, rejecting the definition if any errors are found.
Afterward, the referred variables are checked for type errors, including missing fields and type confusion,
against the matched types of `spec.matchConstraints`.
The result of type checking can be retrieved from `status.typeChecking`.
The presence of `status.typeChecking` indicates the completion of type checking,
and an empty `status.typeChecking` means that no errors were detected.
For example, given the following policy definition:
```yaml
Expand Down

0 comments on commit 4716fc7

Please sign in to comment.