scanJob.customVolumesMount is not applied to the generated Job #2240
Labels
kind/bug
Categorizes issue or PR as related to a bug.
lifecycle/stale
Denotes an issue or PR has remained open with no activity and will be auto-closed.
What steps did you take and what happened:
I added
scanJob.customVolumes
andscanJob.customVolumesMount
to trivy-operator cm.After creating
scan-vulnerabilityreport
job I inspected container's volumeMounts and volumes, then I got the results thatcustomVolumes
were appended to volumes but customVolumesMount were not appended to container'svolumeMounts
.What did you expect to happen:
customVolumesMount
will be appended to container'svolumeMounts
.Anything else you would like to add:
It caused by below.
container
is a pass-by-value and this change doesn't affect the original array.https://github.com/aquasecurity/trivy-operator/blob/v0.22.0/pkg/vulnerabilityreport/builder.go#L168-L175
I will fix it and make PR.
Environment:
trivy-operator version
): v0.22.0kubectl version
): v1.29.6The text was updated successfully, but these errors were encountered: