|
1 | 1 | ### Trivy Operator |
2 | 2 |
|
| 3 | + |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | +## Description |
| 8 | + |
3 | 9 | This chart deploys an operator that default every 5 minutes execute a scan script. It will get image list from all namespaces with the label `trivy-scan=true`, and then scan this images with trivy, finally we will get metrics on `http://[pod-ip]:9115/metrics` |
4 | 10 |
|
5 | 11 | ## Configuration |
6 | 12 |
|
7 | 13 | The following tables lists configurable parameters of the trivy-operator chart and their default values. |
8 | 14 |
|
9 | | -| Parameter | Description | Default | |
10 | | -| ----------------------------------- | ------------------------------------------- | -----------------------------------------| |
11 | | -| image.repository | image | devopstales/trivy-operator | |
12 | | -| image.pullPolicy | pullPolicy | Always | |
13 | | -| image.tag | image tag | 2.4.1 | |
14 | | -| imagePullSecrets | imagePullSecrets list | [] | |
15 | | -| podSecurityContext.fsGroup | mount id | 10001 | |
16 | | -| serviceAccount.create | create serviceAccount | true | |
17 | | -| serviceAccount.annotations | add annotation to serviceAccount | {} | |
18 | | -| serviceAccount.name | name of the serviceAccount | trivy-operator | |
19 | | -| monitoring.port | prometheus endpoint port | 9115 | |
20 | | -| serviceMonitor.enabled | enable serviceMonitor object creation | false | |
21 | | -| serviceMonitor.namespace | where to create serviceMonitor object | kube-system | |
22 | | -| serviceMonitor.interval | set interval to serviceMonitor | 60s | |
23 | | -| serviceMonitor.scrapeTimeout | set scrapeTimeout to serviceMonitor | 30s | |
24 | | -| serviceMonitor.relabelings | set relabelings to serviceMonitor | [] | |
25 | | -| serviceMonitor.metricRelabelings | set metricRelabelings to serviceMonitor | [] | |
26 | | -| persistence.enabled | enable pv to store trivy database | true | |
27 | | -| persistence.size | pv size | 1Gi | |
28 | | -| persistence.storageClass | storageClass | Not defined | |
29 | | -| persistence.accessMode | accessMode | ReadWriteOnce | |
30 | | -| persistence.annotations | add extra annotations | No value | |
31 | | -| NamespaceScanner.crontab | cronjob scheduler | "*/5 * * * *" | |
32 | | -| NamespaceScanner.namespaceSelector | Namespace Selector | "trivy-scan" | |
33 | | -| NamespaceScanner.clusterWide | scan all namespaces | "false" | |
34 | | -| NamespaceScanner.policyreport | generate policy reports | "false" | |
35 | | -| registryAuth.enabled | enable registry authentication in operator | false | |
36 | | -| registryAuth.registry | registry name for authentication | |
37 | | -| registryAuth.user | username for authentication | |
38 | | -| registryAuth.password | password for authentication | |
39 | | -| githubToken.enabled | Enable githubToken usage for trivy database update | false | |
40 | | -| githubToken.token | githubToken value | "" | |
41 | | -| nodeSelector | Select node where deploy | "" | |
42 | | -| tolerations | Tolerations for use with node taints | [] | |
43 | | -| affinity | Assign custom affinity rules to the trivy operator | {} | |
| 15 | +<fill out> |
| 16 | + |
| 17 | +## Values |
| 18 | + |
| 19 | +| Key | Type | Default | Description | |
| 20 | +|-----|------|---------|-------------| |
| 21 | +| TimeZone | string | `"UTC"` | Time Zone in container | |
| 22 | +| admissionController.enabled | bool | `false` | enable adission controller | |
| 23 | +| affinity | object | `{}` | Set the affinity for the pod. | |
| 24 | +| cache.enabled | bool | `false` | enable redis cache | |
| 25 | +| clusterScanner.crontab | string | `"*/1 * * * *"` | crontab for scheduled scan | |
| 26 | +| clusterScanner.enabled | bool | `false` | enable clusterScanner cr creation | |
| 27 | +| clusterScanner.integrations | object | `{}` | configure defectdojo integration | |
| 28 | +| clusterScanner.scanProfileName | string | `"cis-1.23"` | kube-hunter scan profile | |
| 29 | +| githubToken.enabled | bool | `false` | enable github authentiation token | |
| 30 | +| githubToken.token | string | `""` | github authentiation token value | |
| 31 | +| grafana.dashboards.enabled | bool | `true` | Enable the deployment of grafana dashboards | |
| 32 | +| grafana.dashboards.label | string | `"grafana_dashboard"` | Label to find dashboards using the k8s sidecar | |
| 33 | +| grafana.dashboards.value | string | `"1"` | Label value to find dashboards using the k8s sidecar | |
| 34 | +| grafana.folder.annotation | string | `"grafana_folder"` | Annotation to enable folder storage using the k8s sidecar | |
| 35 | +| grafana.folder.name | string | `"Policy Reporter"` | Grafana folder in which to store the dashboards | |
| 36 | +| grafana.namespace | string | `nil` | namespace for configMap of grafana dashboards | |
| 37 | +| image.pullPolicy | string | `"Always"` | The docker image pull policy | |
| 38 | +| image.repository | string | `"devopstales/trivy-operator"` | The docker image repository to use | |
| 39 | +| image.tag | string | `"2.5.0"` | The docker image tag to use | |
| 40 | +| imagePullSecrets | list | `[]` | list of secrets to use for imae pull | |
| 41 | +| kube_bench_scnner.image.pullPolicy | string | `"Always"` | The docker image pull policy | |
| 42 | +| kube_bench_scnner.image.repository | string | `"devopstales/kube-bench-scnner"` | The docker image repository to use | |
| 43 | +| kube_bench_scnner.image.tag | string | `"2.5"` | The docker image tag to use | |
| 44 | +| log_level | string | `"INFO"` | Log level | |
| 45 | +| monitoring.port | string | `"9115"` | configure prometheus monitoring port | |
| 46 | +| namespaceScanner.clusterWide | bool | `false` | | |
| 47 | +| namespaceScanner.crontab | string | `"*/5 * * * *"` | | |
| 48 | +| namespaceScanner.integrations.policyreport | bool | `false` | | |
| 49 | +| namespaceScanner.namespaceSelector | string | `"trivy-scan"` | | |
| 50 | +| nodeSelector | object | `{}` | Set the node selector for the pod. | |
| 51 | +| offline.db_repository | string | `"localhost:5000/trivy-db"` | repository to use for download trivy vuln db | |
| 52 | +| offline.db_repository_insecure | bool | `false` | insecure repository | |
| 53 | +| offline.enabled | bool | `false` | enable air-gapped mode | |
| 54 | +| persistence.accessMode | string | `"ReadWriteOnce"` | Volumes mode | |
| 55 | +| persistence.annotations | object | `{}` | Volumes annotations | |
| 56 | +| persistence.enabled | bool | `true` | Volumes for the pod | |
| 57 | +| persistence.size | string | `"1Gi"` | Volumes size | |
| 58 | +| podSecurityContext | object | `{"fsGroup":10001,"fsGroupChangePolicy":"OnRootMismatch"}` | security options for the pod | |
| 59 | +| registryAuth.enabled | bool | `false` | enable registry authentication | |
| 60 | +| registryAuth.image_pull_secrets | list | `["regcred"]` | list of image pull secrets for authentication | |
| 61 | +| serviceAccount.annotations | object | `{}` | serviceAccount annotations | |
| 62 | +| serviceAccount.create | bool | `true` | Enable serviceAccount creation | |
| 63 | +| serviceAccount.name | string | `"trivy-operator"` | Name of the serviceAccount | |
| 64 | +| serviceMonitor.enabled | bool | `false` | allow to override the namespace for serviceMonitor | |
| 65 | +| serviceMonitor.labels.release | string | `"prometheus"` | labels to match the serviceMonitorSelector of the Prometheus Resource | |
| 66 | +| serviceMonitor.metricRelabelings | list | `[]` | metricRelabeling config for serviceMonitor | |
| 67 | +| serviceMonitor.namespace | object | `{}` | Name of the namespace for serviceMonitor | |
| 68 | +| serviceMonitor.relabelings | list | `[]` | relabel config for serviceMonitor | |
| 69 | +| tolerations | list | `[]` | Set the tolerations for the pod. | |
| 70 | + |
| 71 | +**Homepage:** <https://github.com/devopstales/trivy-operator> |
| 72 | + |
| 73 | +## Source Code |
| 74 | + |
| 75 | +* <https://github.com/devopstales/trivy-operator> |
| 76 | +* <https://github.com/devopstales/helm-charts> |
| 77 | + |
0 commit comments