Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 35dbd77

Browse filesBrowse files
J12934Reet00
authored andcommitted
Set storage limits for cache volumes
Signed-off-by: Jannik Hollenbach <jannik.hollenbach@iteratec.com>
1 parent dc8bf04 commit 35dbd77
Copy full SHA for 35dbd77

File tree

3 files changed

+15
-6
lines changed
Filter options

3 files changed

+15
-6
lines changed

‎scanners/trivy/templates/trivy-database-cache.yaml

Copy file name to clipboardExpand all lines: scanners/trivy/templates/trivy-database-cache.yaml
+4-2Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,11 @@ spec:
4848
{{- end }}
4949
volumes:
5050
- name: cache-dir
51-
emptyDir: {}
51+
emptyDir:
52+
sizeLimit: {{ .Values.trivyDatabaseCache.cacheStorageLimit }}
5253
- name: tmp-dir
53-
emptyDir: {}
54+
emptyDir:
55+
sizeLimit: {{ .Values.trivyDatabaseCache.cacheStorageLimit }}
5456
containers:
5557
- name: trivy-database
5658
image: "{{ .Values.scanner.image.repository }}:{{ .Values.scanner.image.tag | default .Chart.AppVersion }}"

‎scanners/trivy/tests/__snapshot__/scanner_test.yaml.snap

Copy file name to clipboardExpand all lines: scanners/trivy/tests/__snapshot__/scanner_test.yaml.snap
+8-4Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,11 @@ matches the snapshot:
8181
securityContext:
8282
runAsUser: 10001
8383
volumes:
84-
- emptyDir: {}
84+
- emptyDir:
85+
sizeLimit: 1Gi
8586
name: cache-dir
86-
- emptyDir: {}
87+
- emptyDir:
88+
sizeLimit: 1Gi
8789
name: tmp-dir
8890
3: |
8991
apiVersion: execution.securecodebox.io/v1
@@ -489,9 +491,11 @@ works properly in k8sScanScope=cluster:
489491
securityContext:
490492
runAsUser: 10001
491493
volumes:
492-
- emptyDir: {}
494+
- emptyDir:
495+
sizeLimit: 1Gi
493496
name: cache-dir
494-
- emptyDir: {}
497+
- emptyDir:
498+
sizeLimit: 1Gi
495499
name: tmp-dir
496500
3: |
497501
apiVersion: execution.securecodebox.io/v1

‎scanners/trivy/values.yaml

Copy file name to clipboardExpand all lines: scanners/trivy/values.yaml
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,9 @@ trivyDatabaseCache:
123123
podSecurityContext:
124124
runAsUser: 10001
125125

126+
# -- storage limit for the trivy db cache emptyDir volumes. (applied to two volumes)
127+
cacheStorageLimit: 1Gi
128+
126129
# -- Optional securityContext set on database cache container (see: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/)
127130
securityContext:
128131
runAsNonRoot: true

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.