trivy-operator icon indicating copy to clipboard operation
trivy-operator copied to clipboard

Helm Chart - Allow custom volumes for built-in trivy server

Open gustavoromerobenitez opened this issue 1 year ago • 2 comments

While there are options to define custom volumes via the Helm chart for the operator and the scan jobs, there is no option to define custom volumes and volumeMounts for the built-in trivy server.

Use case example: Running the operator and built-in server behind a proxy that does SSL interception, it is necessary to trust the proxy certificate to allow the trivy built-in server to update its database. In this scenario, if the certificate is not trusted, the trivy server enters a CrashLoopBackOff state:

image

I have tried using the trivy.sslCertDir however that creates a hostPath volume which is not as flexible as other types of volume mounts, i.e.: ConfigMaps or Secrets. For instance, the host may not have the right certificates, which is my case. Ideally, the trusted signer certificates would be provided to the built-in trivy server via a ConfigMap or Secret mounted as a volume, i.e.:

volumes:
    - name: trusted-certs
      secret:
        defaultMode: 420
        secretName: trusted-certs
[...]
volumeMounts:
    - name: trusted-certs
      mountPath: /etc/ssl/certs/

The above snippet is in fact what it is possible to configure for the operator, but unfortunately not for the trivy built-in server.

gustavoromerobenitez avatar Sep 30 '24 09:09 gustavoromerobenitez

Also to have this in the Trivy Operator would be nice for the policiesBundle

teimyBr avatar Oct 24 '24 11:10 teimyBr

https://github.com/aquasecurity/trivy-operator/issues/1675 this is also probably related

teimyBr avatar Oct 24 '24 11:10 teimyBr

This issue is stale because it has been labeled with inactivity.

github-actions[bot] avatar Dec 24 '24 00:12 github-actions[bot]

Haven't seen a solution for this anywhere. Any chance someone has solved this?

PT-GD avatar Oct 20 '25 14:10 PT-GD

Haven't seen a solution for this anywhere. Any chance someone has solved this?

trivy server is a separated Statefulset: https://github.com/aquasecurity/trivy-operator/tree/main/deploy/helm/templates/trivy-server

you can customize it yourself

afdesk avatar Oct 20 '25 14:10 afdesk