trivy-operator
by Helm
Helm chartv0.18.0App 0.16.0
Keeps security report resources updated
About this chart
trivy-operator
Keeps security report resources updated
Source Code
Values
| Key | Type | Default | Description |
|---|---|---|---|
| affinity | object | {} | affinity set the operator affinity |
| automountServiceAccountToken | bool | true | automountServiceAccountToken the flag to enable automount for service account token |
| compliance.cron | string | "0 */6 * * *" | cron this flag control the cron interval for compliance report generation |
| compliance.failEntriesLimit | int | 10 | failEntriesLimit the flag to limit the number of fail entries per control check in the cluster compliance detail report |
| compliance.reportType | string | "summary" | reportType this flag control the type of report generated (summary or all) |
| excludeNamespaces | string | "" | excludeNamespaces is a comma separated list of namespaces (or glob patterns) to be excluded from scanning. Only applicable in the all namespaces install mode, i.e. when the targetNamespaces values is a blank string. |
| fullnameOverride | string | "" | fullnameOverride override operator full name |
| image.pullPolicy | string | "IfNotPresent" | pullPolicy set the operator pullPolicy |
| image.pullSecrets | list | [] | pullSecrets set the operator pullSecrets |
| image.registry | string | "ghcr.io" | |
| image.repository | string | "aquasecurity/trivy-operator" | |
| image.tag | string | "" | tag is an override of the image tag, which is by default set by the appVersion field in Chart.yaml. |
| managedBy | string | "Helm" | managedBy is similar to .Release.Service but allows to overwrite the value |
| nameOverride | string | "" | nameOverride override operator name |
| nodeCollector.excludeNodes | string | nil | excludeNodes comma-separated node labels that the node-collector job should exclude from scanning (example kubernetes.io/arch=arm64,team=dev) |
| nodeCollector.imagePullSecret | string | nil | imagePullSecret is the secret name to be used when pulling node-collector image from private registries example : reg-secret It is the user responsibility to create the secret for the private registry in trivy-operator namespace |
| nodeCollector.registry | string | "ghcr.io" | registry of the node-collector image |
| nodeCollector.repository | string | "aquasecurity/node-collector" | repository of the node-collector image |
| nodeCollector.tag | string | "0.0.6" | tag version of the node-collector image |
| nodeCollector.volumeMounts | list | [{"mountPath":"/var/lib/etcd","name":"var-lib-etcd","readOnly":true},{"mountPath":"/var/lib/kubelet","name":"var-lib-kubelet","readOnly":true},{"mountPath":"/var/lib/kube-scheduler","name":"var-lib-kube-scheduler","readOnly":true},{"mountPath":"/var/lib/kube-controller-manager","name":"var-lib-kube-controller-manager","readOnly":true},{"mountPath":"/etc/systemd","name":"etc-systemd","readOnly":true},{"mountPath":"/lib/systemd/","name":"lib-systemd","readOnly":true},{"mountPath":"/etc/kubernetes","name":"etc-kubernetes","readOnly":true},{"mountPath":"/etc/cni/net.d/","name":"etc-cni-netd","readOnly":true}] | node-collector pod volumeMounts definition for collecting config files information |
| nodeCollector.volumes | list | [{"hostPath":{"path":"/var/lib/etcd"},"name":"var-lib-etcd"},{"hostPath":{"path":"/var/lib/kubelet"},"name":"var-lib-kubelet"},{"hostPath":{"path":"/var/lib/kube-scheduler"},"name":"var-lib-kube-scheduler"},{"hostPath":{"path":"/var/lib/kube-controller-manager"},"name":"var-lib-kube-controller-manager"},{"hostPath":{"path":"/etc/systemd"},"name":"etc-systemd"},{"hostPath":{"path":"/lib/systemd"},"name":"lib-systemd"},{"hostPath":{"path":"/etc/kubernetes"},"name":"etc-kubernetes"},{"hostPath":{"path":"/etc/cni/net.d/"},"name":"etc-cni-netd"}] | node-collector pod volumes definition for collecting config files information |
| nodeSelector | object | {} | nodeSelector set the operator nodeSelector |
| operator.accessGlobalSecretsAndServiceAccount | bool | true | accessGlobalSecretsAndServiceAccount The flag to enable access to global secrets/service accounts to allow vulnerability scan job to pull images from private registries |
| operator.batchDeleteDelay | string | "10s" | batchDeleteDelay the duration to wait before deleting another batch of config audit reports. |
| operator.batchDeleteLimit | int | 10 | batchDeleteLimit the maximum number of config audit reports deleted by the operator when the plugin's config has changed. |
| operator.builtInTrivyServer | bool | false | builtInTrivyServer The flag enable the usage of built-in trivy server in cluster ,its also override the following trivy params with built-in values trivy.mode = ClientServer and serverURL = http://.:4975 |
| operator.clusterComplianceEnabled | bool | true | clusterComplianceEnabled the flag to enable cluster compliance scanner |
| operator.configAuditScannerEnabled | bool | true | configAuditScannerEnabled the flag to enable configuration audit scanner |
| operator.configAuditScannerScanOnlyCurrentRevisions | bool | true | configAuditScannerScanOnlyCurrentRevisions the flag to only create config audit scans on the current revision of a deployment. |
| operator.controllerCacheSyncTimeout | string | "5m" | controllerCacheSyncTimeout the duration to wait for controller resources cache sync (default: 5m). |
| operator.exposedSecretScannerEnabled | bool | true | exposedSecretScannerEnabled the flag to enable exposed secret scanner |
| operator.infraAssessmentScannerEnabled | bool | true | infraAssessmentScannerEnabled the flag to enable infra assessment scanner |
| operator.leaderElectionId | string | "trivyoperator-lock" | leaderElectionId determines the name of the resource that leader election will use for holding the leader lock. |
| operator.logDevMode | bool | false | logDevMode the flag to enable development mode (more human-readable output, extra stack traces and logging information, etc) |
| operator.mergeRbacFindingWithConfigAudit | bool | false | mergeRbacFindingWithConfigAudit the flag to enable merging rbac finding with config-audit report |
| operator.metricsConfigAuditInfo | bool | false | MetricsConfigAuditInfo the flag to enable metrics about configuration audits be aware of metrics cardinality is significantly increased with this feature enabled. |
| operator.metricsExposedSecretInfo | bool | false | MetricsExposedSecretInfo the flag to enable metrics about exposed secrets be aware of metrics cardinality is significantly increased with this feature enabled. |
| operator.metricsFindingsEnabled | bool | true | metricsFindingsEnabled the flag to enable metrics for findings |
| operator.metricsInfraAssessmentInfo | bool | false | MetricsInfraAssessmentInfo the flag to enable metrics about Infra Assessment be aware of metrics cardinality is significantly increased with this feature enabled. |
| operator.metricsRbacAssessmentInfo | bool | false | MetricsRbacAssessmentInfo the flag to enable metrics about Rbac Assessment be aware of metrics cardinality is significantly increased with this feature enabled. |
| operator.metricsVulnIdEnabled | bool | false | metricsVulnIdEnabled the flag to enable metrics about cve vulns id be aware of metrics cardinality is significantly increased with this feature enabled. |
| operator.namespace | string | "" | namespace to install the operator, defaults to the .Release.Namespace |
| operator.podLabels | object | {} | additional labels for the operator pod |
| operator.privateRegistryScanSecretsNames | object | {} | privateRegistryScanSecretsNames is map of namespace:secrets, secrets are comma seperated which can be used to authenticate in private registries in case if there no imagePullSecrets provided example : {"mynamespace":"mySecrets,anotherSecret"} |
| operator.rbacAssessmentScannerEnabled | bool | true | rbacAssessmentScannerEnabled the flag to enable rbac assessment scanner |
| operator.replicas | int | 1 | replicas the number of replicas of the operator's pod |
| operator.revisionHistoryLimit | string | nil | number of old history to retain to allow rollback (if not set, default Kubernetes value is set to 10) |
| operator.sbomGenerationEnabled | bool | true | the flag to enable sbom generation |
| operator.scanJobTTL | string | "" | scanJobTTL the set automatic cleanup time after the job is completed |
| operator.scanJobTimeout | string | "5m" | scanJobTimeout the length of time to wait before giving up on a scan job |
| operator.scanJobsConcurrentLimit | int | 10 | scanJobsConcurrentLimit the maximum number of scan jobs create by the operator |
| operator.scanJobsRetryDelay | string | "30s" | scanJobsRetryDelay the duration to wait before retrying a failed scan job |
| operator.scanNodeCollectorLimit | int | 1 | scanNodeCollectorLimit the maximum number of node collector jobs create by the operator |
| operator.scannerReportTTL | string | "24h" | scannerReportTTL the flag to set how long a report should exist. "" means that the ScannerReportTTL feature is disabled |
| operator.trivyServerHealthCheckCacheExpiration | string | "10h" | trivyServerHealthCheckCacheExpiration The flag to set the interval for trivy server health cache before it invalidate |
| operator.vulnerabilityScannerEnabled | bool | true | the flag to enable vulnerability scanner |
| operator.vulnerabilityScannerScanOnlyCurrentRevisions | bool | true | vulnerabilityScannerScanOnlyCurrentRevisions the flag to only create vulnerability scans on the current revision of a deployment. |
| operator.webhookBroadcastTimeout | string | "30s" | webhookBroadcastTimeout the flag to set timeout for webhook requests if webhookBroadcastURL is enabled |
| operator.webhookBroadcastURL | string | "" | webhookBroadcastURL the flag to set reports should be sent to a webhook endpoint. "" means that the webhookBroadcastURL feature is disabled |
| operator.webhookSendDeletedReports | bool | false | webhookSendDeletedReports the flag to enable sending deleted reports if webhookBroadcastURL is enabled |
| podAnnotations | object | {} | podAnnotations annotations added to the operator's pod |
| podSecurityContext | object | {} | |
| priorityClassName | string | "" | priorityClassName set the operator priorityClassName |
| rbac.create | bool | true | |
| resources | object | {} | |
| securityContext | object | {"allowPrivilegeEscalation":false,"capabilities":{"drop":["ALL"]},"privileged":false,"readOnlyRootFilesystem":true} | securityContext security context |
| service | object | {"annotations":{},"metricsPort":80} | service only expose a metrics endpoint for prometheus to scrape, trivy-operator does not have a user interface. |
| service.annotations | object | {} | annotations added to the operator's service |
| serviceAccount.annotations | object | {} | |
| serviceAccount.create | bool | true | Specifies whether a service account should be created. |
| serviceAccount.name | string | "" | name specifies the name of the k8s Service Account. If not set and create is true, a name is generated using the fullname template. |
| serviceMonitor.annotations | object | {} | Additional annotations for the serviceMonitor |
| serviceMonitor.enabled | bool | false | enabled determines whether a serviceMonitor should be deployed |
| serviceMonitor.endpointAdditionalProperties | object | {} | EndpointAdditionalProperties allows setting additional properties on the endpoint such as relabelings, metricRelabelings etc. |
| serviceMonitor.honorLabels | bool | true | HonorLabels chooses the metric’s labels on collisions with target labels |
| serviceMonitor.interval | string | nil | Interval at which metrics should be scraped. If not specified Prometheus’ global scrape interval is used. |
| serviceMonitor.labels | object | {} | Additional labels for the serviceMonitor |
| serviceMonitor.namespace | string | nil | The namespace where Prometheus expects to find service monitors |
| targetNamespaces | string | "" | targetNamespace defines where you want trivy-operator to operate. By default, it's a blank string to select all namespaces, but you can specify another namespace, or a comma separated list of namespaces. |
| targetWorkloads | string | "pod,replicaset,replicationcontroller,statefulset,daemonset,cronjob,job" | targetWorkloads is a comma seperated list of Kubernetes workload resources to be included in the vulnerability and config-audit scans if left blank, all workload resources will be scanned |
| tolerations | list | [] | tolerations set the operator tolerations |
| trivy.additionalVulnerabilityReportFields | string | "" | additionalVulnerabilityReportFields is a comma separated list of additional fields which can be added to the VulnerabilityReport. Supported parameters: Description, Links, CVSS, Target, Class, PackagePath and PackageType |
| trivy.clientServerSkipUpdate | bool | false | clientServerSkipUpdate is the flag to enable skip databases update for Trivy client. Only applicable in ClientServer mode. |
| trivy.command | string | "image" | command. One of image, filesystem or rootfs scanning, depending on the target type required for the scan. For 'filesystem' and rootfs scanning, ensure that the trivyOperator.scanJobPodTemplateContainerSecurityContext is configured to run as the root user (runAsUser = 0). |
| trivy.createConfig | bool | true | createConfig indicates whether to create config objects |
| trivy.dbRegistry | string | "ghcr.io" | |
| trivy.db |
Deploy trivy-operator with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has trivy-operator 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 charttrivy-operator is pinned at v0.18.0 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