harbor icon indicating copy to clipboard operation
harbor copied to clipboard

I use the cephfs as the external persistent volume, but trivy can't running correctly.

Open andyzheung opened this issue 2 years ago • 3 comments

1、trivy helm: image 2、sc: image 3、trivy container logs: image 4、I try it like this, but not ok: (https://github.com/goharbor/harbor/issues/12933#issuecomment-754777914) • One could use a initContainer that sets the right permissions on the volume:

trivy-sts.yaml

[...] initContainers: - name: set-permissions image: busybox:1.28 command: ['chown', '-R', '10000:10000', '/home/scanner/.cache'] volumeMounts: - name: data mountPath: /home/scanner/.cache subPath: {{ .Values.persistence.persistentVolumeClaim.trivy.subPath }} readOnly: false [...]

andyzheung avatar May 11 '22 02:05 andyzheung

@andyzheung did you only specify cephfs for trivy? How about the configuration for persistence.persistentVolumeClaim.registry, persistence.persistentVolumeClaim.database, & persistence.persistentVolumeClaim.redis ?

zyyw avatar May 16 '22 08:05 zyyw

One could use a initContainer that sets the right permissions on the volume:

other component I also use cephfs, but the pod is ok..

andyzheung avatar Jun 09 '22 09:06 andyzheung

This issue is being marked stale due to a period of inactivity. If this issue is still relevant, please comment or remove the stale label. Otherwise, this issue will close in 30 days.

github-actions[bot] avatar Aug 09 '22 09:08 github-actions[bot]

This issue was closed because it has been stalled for 30 days with no activity. If this issue is still relevant, please re-open a new issue.

github-actions[bot] avatar Sep 08 '22 09:09 github-actions[bot]