policy-reporter
by Helm
Policy Reporter watches for PolicyReport Resources. It creates Prometheus Metrics and can send rule validation events to different targets like Loki, Elasticsearch, Slack or Discord
About this chart
Policy Reporter
Motivation
Kyverno ships with two types of validation. You can either enforce a rule or audit it. If you don't want to block developers or if you want to try out a new rule, you can use the audit functionality. The audit configuration creates PolicyReports which you can access with kubectl. Because I can't find a simple solution to get a general overview of this PolicyReports and PolicyReportResults, I created this tool to send information about PolicyReports to different targets like Grafana Loki, Elasticsearch or Slack.
Documentation
You can find detailed Information and Screens about Features and Configurations in the Documentation.
Getting Started
Installation with Helm v3
Installation via Helm Repository
Add the Helm repository
helm repo add policy-reporter https://kyverno.github.io/policy-reporter
helm repo update
Basic Installation
The basic installation provides an Prometheus Metrics Endpoint and different REST APIs, for more details have a look at the Documentation.
helm install policy-reporter policy-reporter/policy-reporter -n policy-reporter --create-namespace
Policy Reporter UI
You can use the Policy Reporter as standalone Application along with the optional UI SubChart.
Installation with Policy Reporter UI and Kyverno Plugin enabled
helm install policy-reporter policy-reporter/policy-reporter --set kyvernoPlugin.enabled=true --set ui.enabled=true --set ui.plugins.kyverno=true -n policy-reporter --create-namespace
kubectl port-forward service/policy-reporter-ui 8082:8080 -n policy-reporter
Open http://localhost:8082/ in your browser.
Check the Documentation for Screens and additional Information
Resources
Deploy policy-reporter with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has policy-reporter on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartpolicy-reporter is pinned at v2.18.2 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below opentenant validate opentenant.yaml terraform init && terraform apply