mirror of
https://github.com/goharbor/harbor.git
synced 2024-09-28 05:18:01 +02:00
fix: remove the scan exports volume (#18109)
1. Change the Export CVE temporary file directory to /tmp. 2. Remove the scan data export volume in Dockerfile and docker-compose yaml. Fixes: #18067 Signed-off-by: chlins <chenyuzh@vmware.com>
This commit is contained in:
parent
1c1ec3c9a3
commit
771373cedf
@ -17,7 +17,7 @@ WORKDIR /harbor/
|
||||
|
||||
USER harbor
|
||||
|
||||
VOLUME ["/var/log/jobs/", "/var/scandata_exports"]
|
||||
VOLUME ["/var/log/jobs/"]
|
||||
|
||||
HEALTHCHECK CMD curl --fail -s http://localhost:8080/api/v1/stats || curl -sk --fail --key /etc/harbor/ssl/job_service.key --cert /etc/harbor/ssl/job_service.crt https://localhost:8443/api/v1/stats || exit 1
|
||||
|
||||
|
@ -253,7 +253,6 @@ services:
|
||||
- SETUID
|
||||
volumes:
|
||||
- {{data_volume}}/job_logs:/var/log/jobs:z
|
||||
- {{data_volume}}/scandata_exports:/var/scandata_exports:z
|
||||
- type: bind
|
||||
source: ./common/config/jobservice/config.yml
|
||||
target: /etc/jobservice/config.yml
|
||||
|
@ -18,8 +18,6 @@ def prepare_job_service(config_dict):
|
||||
# Job log and exported reports are stored in data dir
|
||||
job_log_dir = os.path.join('/data', "job_logs")
|
||||
prepare_dir(job_log_dir, uid=DEFAULT_UID, gid=DEFAULT_GID)
|
||||
job_log_dir = os.path.join('/data', "scandata_exports")
|
||||
prepare_dir(job_log_dir, uid=DEFAULT_UID, gid=DEFAULT_GID)
|
||||
|
||||
# Render Jobservice env
|
||||
render_jinja(
|
||||
|
@ -8,11 +8,12 @@ const (
|
||||
JobNameAttribute = "job_name"
|
||||
UserNameAttribute = "user_name"
|
||||
StatusMessageAttribute = "status_message"
|
||||
ScanDataExportDir = "/var/scandata_exports"
|
||||
QueryPageSize = 100000
|
||||
ArtifactGroupSize = 10000
|
||||
DigestKey = "artifact_digest"
|
||||
CreateTimestampKey = "create_ts"
|
||||
Vendor = "SCAN_DATA_EXPORT"
|
||||
CsvJobVendorIDKey = CsvJobVendorID("vendorId")
|
||||
// the scan data is a temporary file, use /tmp directory to avoid the permission issue.
|
||||
ScanDataExportDir = "/tmp"
|
||||
QueryPageSize = 100000
|
||||
ArtifactGroupSize = 10000
|
||||
DigestKey = "artifact_digest"
|
||||
CreateTimestampKey = "create_ts"
|
||||
Vendor = "SCAN_DATA_EXPORT"
|
||||
CsvJobVendorIDKey = CsvJobVendorID("vendorId")
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user