Skip to content

Commit 0c2ab34

Browse files
author
Lukas Fischer
committed
#911 Add liveness/readiness checks for trivy cache
Trivy server provides a /healthz endpoint that always returns 200 (see aquasecurity/trivy#534), and according to the logs/stdout trivy only starts listening after downloading the database. The helm chart provided by trivy (added in aquasecurity/trivy#751) uses this endpoint for liveness and readiness checks as well. This change therefore integrates the same checks. Signed-off-by: Lukas Fischer <lukas.fischer@iteratec.com>
1 parent 9f477c2 commit 0c2ab34

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

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

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,23 @@ spec:
4848
ports:
4949
- containerPort: 8080
5050
protocol: TCP
51+
name: trivy-http
52+
livenessProbe:
53+
httpGet:
54+
scheme: HTTP
55+
path: /healthz
56+
port: trivy-http
57+
initialDelaySeconds: 5
58+
periodSeconds: 10
59+
successThreshold: 1
60+
failureThreshold: 10
61+
readinessProbe:
62+
httpGet:
63+
scheme: HTTP
64+
path: /healthz
65+
port: trivy-http
66+
initialDelaySeconds: 5
67+
periodSeconds: 10
68+
successThreshold: 1
69+
failureThreshold: 3
5170
{{- end }}

0 commit comments

Comments
 (0)