policy-reporter-preview
by Kyverno
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-preview
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
Documentation
You can find detailed Information and Screens about Features and Configurations in the Documentation.
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
- [Video] 37. #EveryoneCanContribute cafe: Policy reporter for Kyverno
- [Video] Rawkode Live: Hands on Policy Reporter
- [Blog] Monitor Security and Best Practices with Kyverno and Policy Reporter
Values
| Key | Type | Default | Description |
|---|---|---|---|
| nameOverride | string | "" | |
| fullnameOverride | string | "policy-reporter" | |
| namespaceOverride | string | "" | |
| image.registry | string | "ghcr.io" | |
| image.repository | string | "kyverno/policy-reporter" | |
| image.pullPolicy | string | "IfNotPresent" | |
| image.tag | string | "0dfbaa0" | |
| imagePullSecrets | list | [] | |
| priorityClassName | string | "" | |
| replicaCount | int | 1 | |
| revisionHistoryLimit | int | 10 | |
| deploymentStrategy | object | {} | |
| port.name | string | "http" | |
| port.number | int | 8080 | |
| annotations | object | {} | |
| rbac.enabled | bool | true | |
| serviceAccount.create | bool | true | |
| serviceAccount.annotations | object | {} | |
| serviceAccount.name | string | "" | |
| service.enabled | bool | true | |
| service.annotations | object | {} | |
| service.labels | object | {} | |
| service.type | string | "ClusterIP" | |
| service.port | int | 8080 | |
| podSecurityContext.fsGroup | int | 1234 | |
| securityContext.runAsUser | int | 1234 | |
| securityContext.runAsNonRoot | bool | true | |
| securityContext.privileged | bool | false | |
| securityContext.allowPrivilegeEscalation | bool | false | |
| securityContext.readOnlyRootFilesystem | bool | true | |
| securityContext.capabilities.drop[0] | string | "ALL" | |
| securityContext.seccompProfile.type | string | "RuntimeDefault" | |
| podAnnotations | object | {} | |
| podLabels | object | {} | |
| resources | object | {} | |
| networkPolicy.enabled | bool | false | |
| networkPolicy.egress[0].to | string | nil | |
| networkPolicy.egress[0].ports[0].protocol | string | "TCP" | |
| networkPolicy.egress[0].ports[0].port | int | 6443 | |
| networkPolicy.ingress | list | [] | |
| ingress.enabled | bool | false | |
| ingress.className | string | "" | |
| ingress.labels | object | {} | |
| ingress.annotations | object | {} | |
| ingress.hosts[0].host | string | "chart-example.local" | |
| ingress.hosts[0].paths | list | [] | |
| ingress.tls | list | [] | |
| logging.encoding | string | "console" | |
| logging.logLevel | int | 0 | |
| logging.development | bool | false | |
| api.logging | bool | false | |
| rest.enabled | bool | false | |
| metrics.enabled | bool | false | |
| metrics.mode | string | "detailed" | |
| metrics.customLabels | list | [] | |
| profiling.enabled | bool | false | |
| worker | int | 5 | |
| reportFilter.namespaces.include | list | [] | |
| reportFilter.namespaces.exclude | list | [] | |
| reportFilter.disableClusterReports | bool | false | |
| sourceConfig | list | [] | Customize source specific logic like result ID generation |
| sourceFilters | list | [{"disableClusterReports":false,"kinds":{"exclude":["ReplicaSet"]},"selector":{"source":"kyverno"},"uncontrolledOnly":true}] | Source based PolicyReport filter |
| sourceFilters[0] | object | {"disableClusterReports":false,"kinds":{"exclude":["ReplicaSet"]},"selector":{"source":"kyverno"},"uncontrolledOnly":true} | PolicyReport selector. |
| sourceFilters[0].selector.source | string | "kyverno" | select PolicyReport by source |
| sourceFilters[0].uncontrolledOnly | bool | true | Filter out PolicyReports of controlled Pods and Jobs, only works for PolicyReport with scope resource |
| sourceFilters[0].disableClusterReports | bool | false | Filter out ClusterPolicyReports |
| sourceFilters[0].kinds | object | {"exclude":["ReplicaSet"]} | Filter out PolicyReports based on the scope resource kind |
| global.labels | object | {} | |
| basicAuth.username | string | "" | |
| basicAuth.password | string | "" | |
| basicAuth.secretRef | string | "" | |
| emailReports.clusterName | string | "" | |
| emailReports.titlePrefix | string | "Report" | |
| emailReports.resources | object | {} | |
| emailReports.smtp.secret | string | "" | |
| emailReports.smtp.host | string | "" | |
| emailReports.smtp.port | int | 465 | |
| emailReports.smtp.username | string | "" | |
| emailReports.smtp.password | string | "" | |
| emailReports.smtp.from | string | "" | |
| emailReports.smtp.encryption | string | "" | |
| emailReports.smtp.skipTLS | bool | false | |
| emailReports.smtp.certificate | string | "" | |
| emailReports.summary.enabled | bool | false | |
| emailReports.summary.schedule | string | "0 8 * * *" | |
| emailReports.summary.activeDeadlineSeconds | int | 300 | |
| emailReports.summary.backoffLimit | int | 3 | |
| emailReports.summary.ttlSecondsAfterFinished | int | 0 | |
| emailReports.summary.restartPolicy | string | "Never" | |
| emailReports.summary.to | list | [] | |
| emailReports.summary.filter | object | {} | |
| emailReports.summary.channels | list | [] | |
| emailReports.violations.enabled | bool | false | |
| emailReports.violations.schedule | string | "0 8 * * *" | |
| emailReports.violations.activeDeadlineSeconds | int | 300 | |
| emailReports.violations.backoffLimit | int | 3 | |
| emailReports.violations.ttlSecondsAfterFinished | int | 0 | |
| emailReports.violations.restartPolicy | string | "Never" | |
| emailReports.violations.to | list | [] | |
| emailReports.violations.filter | object | {} | |
| emailReports.violations.channels | list | [] | |
| existingTargetConfig.enabled | bool | false | |
| existingTargetConfig.name | string | "" | |
| existingTargetConfig.subPath | string | "" | |
| target.loki.host | string | "" | |
| target.loki.certificate | string | "" | |
| target.loki.skipTLS | bool | false | |
| target.loki.secretRef | string | "" | |
| target.loki.mountedSecret | string | "" | |
| target.loki.path | string | "" | |
| target.loki.minimumSeverity | string | "" | |
| target.loki.sources | list | [] | |
| target.loki.skipExistingOnStartup | bool | true | |
| target.loki.customFields | object | {} | |
| target.loki.headers | object | {} | |
| target.loki.username | string | "" | |
| target.loki.password | string | "" | |
| target.loki.filter | object | {} | |
| target.loki.channels | list | [] | |
| target.elasticsearch.host | string | "" | |
| target.elasticsearch.certificate | string | "" | |
| target.elasticsearch.skipTLS | bool | false | |
| target.elasticsearch.index | string | "policy-reporter" | |
| target.elasticsearch.username | string | "" | |
| target.elasticsearch.password | string | "" | |
| target.elasticsearch.apiKey | string | "" | |
| target.elasticsearch.secretRef | string | "" | |
| target.elasticsearch.mountedSecret | string | "" | |
| target.elasticsearch.rotation | string | "daily" | |
| target.elasticsearch.minimumSeverity | string | "" | |
| target.elasticsearch.sources | list | [] | |
| target.elasticsearch.skipExistingOnStartup | bool | true | |
| target.elasticsearch.typelessApi | bool | false | |
| target.elasticsearch.customFields | object | {} | |
| target.elasticsearch.filter | object | {} | |
| target.elasticsearch.channels | list | [] | |
| target.slack.webhook | string | "" | |
| target.slack.channel | string | "" | |
| target.slack.secretRef | string | "" | |
| target.slack.mountedSecret | string | "" | |
| target.slack.minimumSeverity | string | "" | |
| target.slack.sources | list | [] | |
| target.slack.skipExistingOnStartup | bool | true | |
| target.slack.customFields | object | {} | |
| target.slack.filter | object | {} | |
| target.slack.channels | list | [] | |
| target.discord.webhook | string | "" | |
| target.discord.secretRef | string | "" | |
| target.discord.mountedSecret | string | "" | |
| target.discord.minimumSeverity | string | "" | |
| target.discord.sources | list | [] | |
| target.discord.skipExistingOnStartup | bool | true | |
| target.discord.filter | object | {} | |
| target.discord.channels | list | [] | |
| target.teams.webhook | string | "" | |
| target.teams.secretRef | string | "" | |
| target.teams.mountedSecret | string | "" | |
| target.teams.certificate | string | "" | |
| target.teams.skipTLS | bool | false | |
| target.teams.minimumSeverity | string | "" | |
| target.teams.sources | list | [] | |
| target.teams.skipExistingOnStartup | bool | true | |
| target.teams.filter | object | {} | |
| target.teams.channels | list | [] | |
| target.webhook.host | string | "" | |
| target.webhook.certificate | string | "" | |
| target.webhook.skipTLS | bool | false | |
| target.webhook.secretRef | string | "" | |
| target.webhook.mountedSecret | string | "" | |
| target.webhook.headers | object | {} | |
| target.webhook.minimumSeverity | string | "" | |
| target.webhook.sources | list | [] | |
| target.webhook.skipExistingOnStartup | bool | true | |
| target.webhook.customFields | object | {} | |
| target.webhook.filter | object | {} | |
| target.webhook.channels | list | [] | |
| target.telegram.token | string | "" | |
| target.telegram.chatId | string | "" | |
| target.telegram.host | string | "" | |
| target.telegram.certificate | string | "" | |
| target.telegram.skipTLS | bool | false | |
| target.telegram.secretRef | string | "" | |
| target.telegram.mountedSecret | string | "" | |
| target.telegram.headers | object | {} | |
| target.telegram.minimumSeverity | string | "" | |
| target.telegram.sources | list | [] | |
| target.telegram.skipExistingOnStartup | bool | true | |
| target.telegram.customFields | object | {} | |
| target.telegram.filter | object | {} | |
| target.telegram.channels | list | [] | |
| target.googleChat.webhook | string | "" | |
| target.googleChat.certificate | string | "" | |
| target.googleChat.skipTLS | bool | false | |
| target.googleChat.secretRef | string | "" | |
| target.googleChat.mountedSecret | string | "" | |
| target.googleChat.headers | object | {} | |
| target.googleChat.minimumSeverity | string | "" | |
| target.googleChat.sources | list | [] | |
| target.googleChat.skipExistingOnStartup | bool | true | |
| target.googleChat.customFields | object | {} | |
| target.googleChat.filter | object | {} | |
| target.googleChat.channels | list | [] | |
| target.s3.accessKeyId | string | "" | |
| target.s3.secretAccessKey | string | "" | |
| target.s3.secretRef | string | "" | |
| target.s3.mountedSecret | string | "" | |
| target.s3.region | string | "" | |
| target.s3.endpoint | string | "" | |
| target.s3.bucket | string | "" | |
| target.s3.bucketKeyEnabled | bool | false | |
| target.s3.kmsKeyId | string | "" | |
| target.s3.serverSideEncryption | string | "" | |
| target.s3.pathStyle | bool | false | |
| target.s3.prefix | string | "" | |
| target.s3.minimumSeverity | string | "" | |
| target.s3.sources | list | [] | |
| target.s3.skipExistingOnStartup | bool | true | |
| target.s3.customFields | object | {} | |
| target.s3.filter | object | {} | |
| target.s3.channels | list | [] | |
| target.kinesis.accessKeyId | string | "" | |
| target.kinesis.secretAccessKey | string | "" | |
| target.kinesis.secretRef | string | "" | |
| target.kinesis.mountedSecret | string | "" | |
| target.kinesis.region | string | "" | |
| target.kinesis.endpoint | string | "" | |
| target.kinesis.streamName | string |
Deploy policy-reporter-preview 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-preview 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-preview is pinned at v3.0.0-beta.18 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