From 5e11a7cca24113651dac9fa1ca9d70bb6b643b3c Mon Sep 17 00:00:00 2001 From: Franco Date: Fri, 20 Dec 2024 09:28:37 -0300 Subject: [PATCH] Make liveness probe configurable --- helm/trivy/templates/statefulset.yaml | 2 +- helm/trivy/values.yaml | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/helm/trivy/templates/statefulset.yaml b/helm/trivy/templates/statefulset.yaml index efb90274fe2c..1ee9cc6a29b9 100644 --- a/helm/trivy/templates/statefulset.yaml +++ b/helm/trivy/templates/statefulset.yaml @@ -103,7 +103,7 @@ spec: scheme: HTTP path: /healthz port: trivy-http - initialDelaySeconds: 5 + initialDelaySeconds: {{ default 5 .Values.livenessProbe.initialDelaySeconds }} periodSeconds: 10 successThreshold: 1 failureThreshold: 10 diff --git a/helm/trivy/values.yaml b/helm/trivy/values.yaml index a969f10b7899..73d780d6a0b1 100644 --- a/helm/trivy/values.yaml +++ b/helm/trivy/values.yaml @@ -56,6 +56,11 @@ tolerations: [] ## Ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ podAnnotations: {} +# Allow Trivy to download the database before being killed. In some cases the conection to gsoci can be slow and take longer than the default +# Maybe we can remove this once we have Zot +livenessProbe: + initialDelaySeconds: 300 + trivy: # debugMode the flag to enable Trivy debug mode debugMode: false