Skip to content

feat(clientServer): add support for extraVolumes in trivy-server#2738

Merged
simar7 merged 1 commit intoaquasecurity:mainfrom
hichem-belhocine:server-extraVolume
Sep 10, 2025
Merged

feat(clientServer): add support for extraVolumes in trivy-server#2738
simar7 merged 1 commit intoaquasecurity:mainfrom
hichem-belhocine:server-extraVolume

Conversation

@hichem-belhocine
Copy link
Copy Markdown
Contributor

@hichem-belhocine hichem-belhocine commented Sep 3, 2025

Refactors values.yaml to introduce two top-level keys:

  • trivy.server.extraVolumes.volumeMounts
  • trivy.server.extraVolumes.volumes

This allows mounting additional ConfigMaps or Secrets into the trivy-server Statefulset

Description

The server needs to get the vulnerability database from docker registry e.g., Artifactory which uses certs

Error:

Failed to verify certificates: x509: certificate signed by unknown authority

Solution

Mounting CAs as a volume solves the issue

Related issues

  • Close #XXX

Remove this section if you don't have related PRs.

Checklist

  • I've read the guidelines for contributing to this repository.
  • I've added tests that prove my fix is effective or that my feature works.
  • I've updated the documentation with the relevant information (if needed).
  • I've added usage information (if the PR introduces new options)
  • I've included a "before" and "after" example to the description (if the PR is a user interface change).

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Sep 3, 2025

CLA assistant check
All committers have signed the CLA.

@afdesk
Copy link
Copy Markdown
Contributor

afdesk commented Sep 8, 2025

@hichem-belhocine thanks for your contribution!
could you fix the checks?

@hichem-belhocine
Copy link
Copy Markdown
Contributor Author

could you fix the checks?

Done

thanks @afdesk

@hichem-belhocine
Copy link
Copy Markdown
Contributor Author

@simar7 could you take a look at this PR when you have time?

replicas: 1

# -- volumes set trivy-server volumes
extraVolumes:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hichem-belhocine
what do you think if we add a server server for this block?
something like extraServerVolumes

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's OK for me, should i change it?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it would be nice. thanks

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@afdesk
Copy link
Copy Markdown
Contributor

afdesk commented Sep 9, 2025

@hichem-belhocine thanks!
this idea looks Ok for me.
left one small comment

@afdesk
Copy link
Copy Markdown
Contributor

afdesk commented Sep 9, 2025

@hichem-belhocine
it seems you need to run mage generate:all

Refactors values.yaml to introduce two top-level keys:
- trivy.server.extraVolumes.volumeMounts
- trivy.server.extraVolumes.volumes

This allows mounting additional ConfigMaps or Secrets into the trivy-server Statefulset
@hichem-belhocine
Copy link
Copy Markdown
Contributor Author

@hichem-belhocine it seems you need to run mage generate:all

Done

Copy link
Copy Markdown
Contributor

@afdesk afdesk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hichem-belhocine thanks for your efforts!
LGTM!

@simar7 could you pls take a look too?

@simar7 simar7 merged commit 8049fc7 into aquasecurity:main Sep 10, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants