Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom volume mounts not applied to containers and init containers #2348

Open
tom1299 opened this issue Dec 4, 2024 · 0 comments
Open

Custom volume mounts not applied to containers and init containers #2348

tom1299 opened this issue Dec 4, 2024 · 0 comments
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@tom1299
Copy link

tom1299 commented Dec 4, 2024

What steps did you take and what happened:
I added customVolumes and customVolumeMounts to the values of the trivy-operator helm-chart:

trivyOperator:
    scanJobCustomVolumesMount:
      - name: trivy-cache
        mountPath: /tmp/trivy/.cache
        readOnly: false
    scanJobCustomVolumes:
      - name: trivy-cache
        persistentVolumeClaim:
          claimName: trivy-cache

The resulting Pod did include the custom volume but not the volumeMount (neither main nor init container):

    volumeMounts:
    - mountPath: /tmp
      name: tmp
    - mountPath: /tmp/scan
      name: scanresult
... 
    volumeMounts:
    - mountPath: /tmp
      name: tmp
...
  volumes:
  - emptyDir: {}
    name: tmp
  - emptyDir: {}
    name: scanresult
  - name: trivy-cache
    persistentVolumeClaim:
      claimName: trivy-cache

What did you expect to happen:
The volumeMoutns should have been added.

Anything else you would like to add:
I created a pull request #2347

Environment:

  • Trivy-Operator version (use trivy-operator version): Custom build from main branch (dc44a0a)
  • Kubernetes version (use kubectl version): Client Version: v1.31.0, Server Version: v1.30.0
  • OS (macOS 10.15, Windows 10, Ubuntu 19.10 etc): Fedora release 39 (Thirty Nine)
@tom1299 tom1299 added the kind/bug Categorizes issue or PR as related to a bug. label Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

No branches or pull requests

1 participant