Skip to content

Commit

Permalink
do not set volume mount when trivy persistence is disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
matheusfm committed Apr 24, 2024
1 parent 2d0d0ec commit 36b2d34
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/plugins/cronjob.go
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ func (r *CronJobMutator) pluginContainer() corev1.Container {
if pointer.BoolDeref(r.Plugin.Spec.MountCustomChecksVolume, false) {
c.VolumeMounts = append(c.VolumeMounts, customChecksVolume)
}
if r.Plugin.Name == "trivy" {
if r.Plugin.Name == "trivy" && r.TrivyPVC != "" {
c.VolumeMounts = append(c.VolumeMounts, trivyDBVolumeMount)
}
return c
Expand Down

0 comments on commit 36b2d34

Please sign in to comment.