Skip to content

Commit

Permalink
feat(helm): make cache TTL configurable (#2798)
Browse files Browse the repository at this point in the history
Signed-off-by: elchenberg <elchenberg@users.noreply.github.com>
  • Loading branch information
elchenberg committed Sep 8, 2022
1 parent 0f1f2c1 commit 41a8496
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions helm/trivy/README.md
Expand Up @@ -72,6 +72,7 @@ The following table lists the configurable parameters of the Trivy chart and the
| `trivy.dbRepository` | OCI repository to retrieve the trivy vulnerability database from | `ghcr.io/aquasecurity/trivy-db` |
| `trivy.cache.redis.enabled` | Enable Redis as caching backend | `false` |
| `trivy.cache.redis.url` | Specify redis connection url, e.g. redis://redis.redis.svc:6379 | `` |
| `trivy.cache.redis.ttl` | Specify redis TTL, e.g. 3600s or 24h | `` |
| `trivy.serverToken` | The token to authenticate Trivy client with Trivy server | `` |
| `trivy.existingSecret` | existingSecret if an existing secret has been created outside the chart. Overrides gitHubToken, registryUsername, registryPassword, serverToken | `` |
| `trivy.podAnnotations` | Annotations for pods created by statefulset | `{}` |
Expand Down
1 change: 1 addition & 0 deletions helm/trivy/templates/configmap.yaml
Expand Up @@ -9,6 +9,7 @@ data:
TRIVY_CACHE_DIR: "/home/scanner/.cache/trivy"
{{- if .Values.trivy.cache.redis.enabled }}
TRIVY_CACHE_BACKEND: {{ .Values.trivy.cache.redis.url | quote }}
TRIVY_CACHE_TTL: {{ .Values.trivy.cache.redis.ttl | quote }}
{{- end }}
TRIVY_DEBUG: {{ .Values.trivy.debugMode | quote }}
TRIVY_SKIP_UPDATE: {{ .Values.trivy.skipUpdate | quote }}
Expand Down
1 change: 1 addition & 0 deletions helm/trivy/values.yaml
Expand Up @@ -113,6 +113,7 @@ trivy:
redis:
enabled: false
url: "" # e.g. redis://redis.redis.svc:6379
ttl: "" # e.g 3600s, 24h
serviceAccount:
annotations: {}
# eks.amazonaws.com/role-arn: arn:aws:iam::ACCOUNT_ID:role/IAM_ROLE_NAME
Expand Down

0 comments on commit 41a8496

Please sign in to comment.