Audit Scanner
Beginning with version v1.7.0
, Kubewarden has a new feature called "Audit Scanner".
A new component, called "audit-scanner", constantly checks the resources declared in the
cluster, flagging the ones that do not adhere with the deployed Kubewarden policies.
Policies evolve over the time: new ones are deployed and the existing ones can be updated, both in terms of version and configuration settings. This can lead to situations where resources already inside of the cluster are no longer compliant.
The audit scanner feature provides Kubernetes administrators with a tool to consistently verify the compliance state of their clusters.
Installation​
The audit scanner component is available since Kubewarden v1.7.0
. Therefore,
make sure you are installing the Helm chart with app version v1.7.0
or
higher.
-
Install the
kubewarden-crds
Helm chart. The chart install the neededPolicyReport
CRDs by default.helm install kubewarden-crds kubewarden/kubewarden-crds
cautionTo store the results of policy reports, you need to have the PolicyReport Custom Resource Definitions (CRDs) available. If the necessary PolicyReport CRDs are already in the cluster, you cannot install them using the kubewarden-crds chart. In such case, you can disable the installation of PolicyReport CRDs by setting
installPolicyReportCRDs
tofalse
in the chart. This means that the Kubewarden stack will not manage those CRDs, and the responsibility will be with the administrator.See more info about the CRDs at the policy work group repository
-
Install the
kubewarden-controller
Helm chart.helm install kubewarden-controller kubewarden/kubewarden-controller
noteThe audit scanner is enabled by default. If you want to disable it, set the
auditScanner.enable=false
.For more information about the installation of Kubewarden see the Quick Start guide
By default, the Audit Scanner is implemented as a Cronjob that will be triggered every 60 minutes. You can adjust this and other audit scanner settings by changing the kubewarden-controller chart values.yaml.
See here more information about the Audit Scanner.