trivy-operator

by DARK-art108

Helm chartv0.25.0App 0.23.0

Keeps security report resources updated

About this chart

trivy-operator

Keeps security report resources updated

Source Code

Values

KeyTypeDefaultDescription
affinityobject{}affinity set the operator affinity
automountServiceAccountTokenbooltrueautomountServiceAccountToken the flag to enable automount for service account token
compliance.cronstring"0 */6 * * *"cron this flag control the cron interval for compliance report generation
compliance.failEntriesLimitint10failEntriesLimit the flag to limit the number of fail entries per control check in the cluster compliance detail report this limit is for preventing the report from being too large per control checks
compliance.reportTypestring"summary"reportType this flag control the type of report generated (summary or all)
compliance.specslist["k8s-cis-1.23","k8s-nsa-1.0","k8s-pss-baseline-0.1","k8s-pss-restricted-0.1"]specs is a list of compliance specs to be used by the cluster compliance scanner - k8s-cis-1.23 - k8s-nsa-1.0 - k8s-pss-baseline-0.1 - k8s-pss-restricted-0.1 - eks-cis-1.4 - rke2-cis-1.24
excludeNamespacesstring""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.
fullnameOverridestring""fullnameOverride override operator full name
globalobject{"image":{"registry":""}}global values provide a centralized configuration for 'image.registry', reducing the potential for errors. If left blank, the chart will default to the individually set 'image.registry' values
image.pullPolicystring"IfNotPresent"pullPolicy set the operator pullPolicy
image.pullSecretslist[]pullSecrets set the operator pullSecrets
image.registrystring"mirror.gcr.io"
image.repositorystring"aquasec/trivy-operator"
image.tagstring""tag is an override of the image tag, which is by default set by the appVersion field in Chart.yaml.
managedBystring"Helm"managedBy is similar to .Release.Service but allows to overwrite the value
nameOverridestring""nameOverride override operator name
nodeCollector.excludeNodesstringnilexcludeNodes comma-separated node labels that the node-collector job should exclude from scanning (example kubernetes.io/arch=arm64,team=dev)
nodeCollector.imagePullSecretstringnilimagePullSecret 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.registrystring"ghcr.io"registry of the node-collector image
nodeCollector.repositorystring"aquasecurity/node-collector"repository of the node-collector image
nodeCollector.tagstring"0.3.1"tag version of the node-collector image
nodeCollector.tolerationslist[]tolerations to be applied to the node-collector so that they can run on nodes with matching taints
nodeCollector.useNodeSelectorbooltrueuseNodeSelector determine if to use nodeSelector (by auto detecting node name) with node-collector scan job
nodeCollector.volumeMountslist[{"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 volume mounts definition for collecting config files information
nodeCollector.volumeslist[{"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
nodeSelectorobject{}nodeSelector set the operator nodeSelector
operator.accessGlobalSecretsAndServiceAccountbooltrueaccessGlobalSecretsAndServiceAccount The flag to enable access to global secrets/service accounts to allow vulnerability scan job to pull images from private registries
operator.annotationsobject{}additional annotations for the operator deployment
operator.batchDeleteDelaystring"10s"batchDeleteDelay the duration to wait before deleting another batch of config audit reports.
operator.batchDeleteLimitint10batchDeleteLimit the maximum number of config audit reports deleted by the operator when the plugin's config has changed.
operator.builtInServerRegistryInsecureboolfalsebuiltInServerRegistryInsecure is the flag to enable insecure connection from the built-in Trivy server to the registry.
operator.builtInTrivyServerboolfalsebuiltInTrivyServer The flag enables the usage of built-in trivy server in cluster. It also overrides the following trivy params with built-in values trivy.mode = ClientServer and serverURL = http://.:4975
operator.cacheReportTTLstring"120h"cacheReportTTL the flag to set how long a cluster sbom report should exist. "" means that the cacheReportTTL feature is disabled
operator.clusterComplianceEnabledbooltrueclusterComplianceEnabled the flag to enable cluster compliance scanner
operator.clusterSbomCacheEnabledboolfalsethe flag to enable cluster sbom cache generation
operator.configAuditScannerEnabledbooltrueconfigAuditScannerEnabled the flag to enable configuration audit scanner
operator.configAuditScannerScanOnlyCurrentRevisionsbooltrueconfigAuditScannerScanOnlyCurrentRevisions the flag to only create config audit scans on the current revision of a deployment.
operator.controllerCacheSyncTimeoutstring"5m"controllerCacheSyncTimeout the duration to wait for controller resources cache sync (default: 5m).
operator.exposedSecretScannerEnabledbooltrueexposedSecretScannerEnabled the flag to enable exposed secret scanner
operator.httpProxystringnilhttpProxy is the HTTP proxy used by Trivy operator to download the default policies from GitHub.
operator.httpsProxystringnilhttpsProxy is the HTTPS proxy used by Trivy operator to download the default policies from GitHub.
operator.infraAssessmentScannerEnabledbooltrueinfraAssessmentScannerEnabled the flag to enable infra assessment scanner
operator.labelsobject{}additional labels for the operator deployment
operator.leaderElectionIdstring"trivyoperator-lock"leaderElectionId determines the name of the resource that leader election will use for holding the leader lock.
operator.logDevModeboolfalselogDevMode the flag to enable development mode (more human-readable output, extra stack traces and logging information, etc)
operator.mergeRbacFindingWithConfigAuditboolfalsemergeRbacFindingWithConfigAudit the flag to enable merging rbac finding with config-audit report
operator.metricsClusterComplianceInfoboolfalseMetricsClusterComplianceInfo the flag to enable metrics about Cluster Compliance be aware of metrics cardinality is significantly increased with this feature enabled.
operator.metricsConfigAuditInfoboolfalseMetricsConfigAuditInfo the flag to enable metrics about configuration audits be aware of metrics cardinality is significantly increased with this feature enabled.
operator.metricsExposedSecretInfoboolfalseMetricsExposedSecretInfo the flag to enable metrics about exposed secrets be aware of metrics cardinality is significantly increased with this feature enabled.
operator.metricsFindingsEnabledbooltruemetricsFindingsEnabled the flag to enable metrics for findings
operator.metricsImageInfoboolfalseMetricsImageInfo the flag to enable metrics about Image Information of scanned images This information has image os information including os family, name/version, and if end of service life has been reached be aware of metrics cardinality is significantly increased with this feature enabled.
operator.metricsInfraAssessmentInfoboolfalseMetricsInfraAssessmentInfo the flag to enable metrics about Infra Assessment be aware of metrics cardinality is significantly increased with this feature enabled.
operator.metricsRbacAssessmentInfoboolfalseMetricsRbacAssessmentInfo the flag to enable metrics about Rbac Assessment be aware of metrics cardinality is significantly increased with this feature enabled.
operator.metricsVulnIdEnabledboolfalsemetricsVulnIdEnabled the flag to enable metrics about cve vulns id be aware of metrics cardinality is significantly increased with this feature enabled.
operator.namespacestring""namespace to install the operator, defaults to the .Release.Namespace
operator.noProxystringnilnoProxy is a comma separated list of IPs and domain names that are not subject to proxy settings.
operator.podLabelsobject{}additional labels for the operator pod
operator.privateRegistryScanSecretsNamesobject{}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.rbacAssessmentScannerEnabledbooltruerbacAssessmentScannerEnabled the flag to enable rbac assessment scanner
operator.replicasint1replicas the number of replicas of the operator's pod
operator.revisionHistoryLimitstringnilnumber of old history to retain to allow rollback (if not set, default Kubernetes value is set to 10)
operator.sbomGenerationEnabledbooltruethe flag to enable sbom generation, required for enabling ClusterVulnerabilityReports
operator.scanJobTTLstring""scanJobTTL the set automatic cleanup time after the job is completed
operator.scanJobTimeoutstring"5m"scanJobTimeout the length of time to wait before giving up on a scan job
operator.scanJobsConcurrentLimitint10scanJobsConcurrentLimit the maximum number of scan jobs create by the operator
operator.scanJobsRetryDelaystring"30s"scanJobsRetryDelay the duration to wait before retrying a failed scan job
operator.scanNodeCollectorLimitint1scanNodeCollectorLimit the maximum number of node collector jobs create by the operator
operator.scanSecretTTLstring""scanSecretTTL set an automatic cleanup for scan job secrets
operator.scannerReportTTLstring"24h"scannerReportTTL the flag to set how long a report should exist. "" means that the ScannerReportTTL feature is disabled
operator.serverAdditionalAnnotationsobject{}serverAdditionalAnnotations the flag to set additional annotations for the trivy server pod
operator.trivyServerHealthCheckCacheExpirationstring"10h"trivyServerHealthCheckCacheExpiration The flag to set the interval for trivy server health cache before it invalidate
operator.valuesFromConfigMapstring""vaulesFromConfigMap name of a ConfigMap to apply OPERATOR_* environment variables. Will override Helm values.
operator.valuesFromSecretstring""valuesFromSecret name of a Secret to apply OPERATOR_* environment variables. Will override Helm AND ConfigMap values.
operator.vulnerabilityScannerEnabledbooltruethe flag to enable vulnerability scanner
operator.vulnerabilityScannerScanOnlyCurrentRevisionsbooltruevulnerabilityScannerScanOnlyCurrentRevisions the flag to only create vulnerability scans on the current revision of a deployment.
operator.webhookBroadcastCustomHeadersstring""webhookBroadcastCustomHeaders the flag to set webhook endpoint sent with custom defined headers if webhookBroadcastURL is enabled
operator.webhookBroadcastTimeoutstring"30s"webhookBroadcastTimeout the flag to set timeout for webhook requests if webhookBroadcastURL is enabled
operator.webhookBroadcastURLstring""webhookBroadcastURL the flag to set reports should be sent to a webhook endpoint. "" means that the webhookBroadcastURL feature is disabled
operator.webhookSendDeletedReportsboolfalsewebhookSendDeletedReports the flag to enable sending deleted reports if webhookBroadcastURL is enabled
podAnnotationsobject{}podAnnotations annotations added to the operato

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.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the charttrivy-operator is pinned at v0.25.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. 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