-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Frank Jogeleit <[email protected]>
- Loading branch information
Frank Jogeleit
committed
Mar 25, 2024
1 parent
70133c3
commit d5b9dca
Showing
6 changed files
with
70 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
# Policy Reporter UI - Generate Kyverno PolicyExceptions | ||
|
||
The Policy Reporter UI provides a visual overview of the policy status in your cluster, but no action you can take to change the status by default. | ||
|
||
In the case of Kyverno, you have two options for dealing with policy failure. You can either fix it or create an exception for it. While the first option is difficult to automate and not always possible, creating an exception is relatively easy and can help exclude resources from validation that you are not able to fix immediately. | ||
|
||
To support this process, the new Policy Reporter plugin system provides an Exception API that can be used to implement source-specific logic for PolicyException creation. The new Policy Reporter Kyverno plugin utilizes this API to provide an automated method for generating Kyverno PolicyException CRD resources that excludes a single or all failed policies depending on the context in the UI. | ||
|
||
## Configuration | ||
|
||
Because the Exception API is part of the Policy Reporter Kyverno Plugin, its required to install this plugin to use it and enable the exception feature. | ||
|
||
### Helm 3 Configuration | ||
|
||
```yaml | ||
plugin: | ||
kyverno: | ||
enabled: true | ||
|
||
ui: | ||
enabled: true | ||
sources: | ||
- name: kyverno | ||
exceptions: true | ||
excludes: | ||
namespaceKinds: | ||
- Pod | ||
- Job | ||
- ReplicaSet | ||
results: | ||
- warn | ||
- error | ||
``` | ||
### UI Configuration | ||
```yaml | ||
# Configure the Kyverno Plugin the Cluster config | ||
clusters: | ||
- name: Default | ||
host: http://policy-reporter:8080 | ||
plugins: | ||
- name: kyverno | ||
host: http://policy-reporter-kyverno-plugin:8080/api | ||
|
||
# Enable `exceptions` in the kyverno source configuration | ||
sources: | ||
- name: kyverno | ||
exceptions: true | ||
excludes: | ||
namespaceKinds: | ||
- Pod | ||
- Job | ||
- ReplicaSet | ||
results: | ||
- warn | ||
- error | ||
``` | ||
### Examples | ||
![Exception Resource List](https://github.com/kyverno/policy-reporter/blob/3.x/docs/images/exceptions/resource-list.png) | ||
![Exception Dialog](https://github.com/kyverno/policy-reporter/blob/3.x/docs/images/exceptions/exception-dialog.png) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.