Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
Signed-off-by: Frank Jogeleit <[email protected]>
  • Loading branch information
Frank Jogeleit committed Mar 24, 2024
1 parent c7c214a commit 96e94a8
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,38 @@ http://localhost:8083/policies/default/restrict-apparmor-profiles

![Kyverno Policy Details](./screens/kyverno-details.png)

### [POST] V1 Policy Exception API

The `/v1/policies/exception` API provides a way to create an Exception for a given Resource, Policy and Rules.

### Request Body

```json
{
"resource": {
"apiVersion": "apps/v1",
"kind": "Deployment",
"name": "local-path-provisioner",
"namespace": "local-path-storage"
},
"policy": {
"name": "disallow-capabilities-strict",
"rules": ["autogen-require-drop-all"]
}
}
```

### Response

```json
{
"resource": "kind: PolicyException\napiVersion: kyverno.io/v2beta1\nmetadata:\n name: local-path-provisioner-exception\n namespace: local-path-storage\n creationTimestamp: null\nspec:\n match:\n any:\n - resources:\n kinds:\n - Deployment\n - Pod\n - ReplicaSet\n names:\n - local-path-provisioner*\n namespaces:\n - local-path-storage\n exceptions:\n - policyName: disallow-capabilities-strict\n ruleNames:\n - autogen-require-drop-all\n - require-drop-all\n"
}
```

![Kyverno PolicyException](./screens/kyverno-exception.png)

Examples:
## Example Client

In `/example` you find an example plugin service with fixture content and a Swagger UI.
Expand Down
Binary file added screens/kyverno-exception.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 96e94a8

Please sign in to comment.