Commit Graph

1284 Commits

Author SHA1 Message Date
Shengwen YU
d0a5032b84
feat: bump up golang-runtime from 1.19.3 to 1.21.4; upgrade MOCKERY_VERSION; upgrade golangci-lint; fix mock issue (#19608)
feat: upgrade golang-runtime from 1.19.3 to 1.21.4; upgrade golangci-lint version to v1.51.2; upgrade MOCKERY_VERSION to v2.22.1; fix mock issue

Signed-off-by: Shengwen Yu <yshengwen@vmware.com>
2023-11-24 15:11:45 +08:00
MinerYang
c91e950ff3
bump goharbor/golang 1.19.13 on release-2.7.0 (#19324)
bump golang 1.19.13 on release-2.7.0

Signed-off-by: yminer <yminer@vmware.com>
2023-09-08 00:21:57 +08:00
Chlins Zhang
a324b2dd20
[cherry-pick] fix: support customize cache db for business (#19189)
fix: support customize cache db for business

Support to configure the customized redis db for cache layer and other
misc business for core, by default the behavior is same with
previous(stored in db 0).

Signed-off-by: chlins <chenyuzh@vmware.com>
2023-08-17 08:38:37 +08:00
Chlins Zhang
8476e07d75
[cherry-pick] chore: fix incorrect otel timeout in harbor yaml template (#19121)
chore: fix incorrect otel timeout in harbor yaml template

Update the incorrect otel timeout sample value in the harbor YAML
configuration template.

Signed-off-by: chlins <chenyuzh@vmware.com>
2023-08-16 15:05:34 +08:00
MinerYang
738f57567e
bump go1.19.12 on release-2.7.0 base on ph4 (#19162)
Signed-off-by: yminer <yminer@vmware.com>
2023-08-14 15:24:11 +08:00
Chlins Zhang
2ee3c3e40d
fix: patch migration SQL by code (#18660)
Using code to patch the migration SQL instead of migration SQL file by
go-migrate, the latter way will bring the potential upgrade issue, refer
to code comments for more details.

Signed-off-by: chlins <chenyuzh@vmware.com>
2023-05-16 15:08:34 +08:00
MinerYang
e54389f271
bump golang 1.19.9 on release-2.7.0 (#18650)
Signed-off-by: yminer <yminer@vmware.com>
2023-05-09 11:11:52 +08:00
Chlins Zhang
e180723bdc
[cherry-pick] fix: improve the performance of list artifacts (#18632)
fix: improve the performance of list artifacts

1. Change the query for listing tasks of scan which can use the db
   index.
2. Add the gin index for task.extra_attrs.report_uuids

Fixes: #18013

Signed-off-by: chlins <chenyuzh@vmware.com>
2023-05-05 14:15:55 +08:00
MinerYang
a051373ee9
[cherry-pick]allow redis password safe special characters on release-2.7.0 (#18586)
allow redis password safe special characters

Signed-off-by: yminer <yminer@vmware.com>

string and None type conversion
2023-04-24 09:52:17 +08:00
MinerYang
67e5a24ff8
bump golang 1.19.8 on release-2.7.0 (#18496)
Signed-off-by: yminer <yminer@vmware.com>

add GOFLAGS=-buildvcs=false
2023-04-10 10:47:07 +08:00
Yang Jiao
6015b3efa7
[cherry-pick]Update DB Dockerfile.base (#18246)
Update DB Dockerfile.base

1. Update the path to postgresql.conf.sample as it has changed in postgresql 13.10
2. Remove creating symbolic link as it already exists in postgresql 13.10

Signed-off-by: Yang Jiao <jiaoya@vmware.com>
2023-02-20 15:52:13 +08:00
Chlins Zhang
771373cedf
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>
2023-01-31 11:32:29 +08:00
MinerYang
864aca345f
Bump up golang 1.19.4 for release 2.7.0 (#17996)
bump golang 1.19.4 in release-2.7.0

Signed-off-by: yminer <yminer@vmware.com>

Signed-off-by: yminer <yminer@vmware.com>
2022-12-15 12:04:33 +08:00
Wang Yan
8dac344a48
remove the redundant data from table artifact_blob (#17959)
use sql in the migration process to delete all the useless data of table artifact_blob

Signed-off-by: Wang Yan <wangyan@vmware.com>

Signed-off-by: Wang Yan <wangyan@vmware.com>
2022-12-08 22:13:47 +08:00
Jianwei Guo
cb11540a14
add parameters for PostgreSQL (#16641)
Signed-off-by: sayaoailun <guojianwei007@126.com>
2022-11-30 19:08:08 +08:00
MinerYang
9ae35dbc50
add migration script for 2.7 (#17838)
add migration script for 2.7
Signed-off-by: yminer <yminer@vmware.com>
2022-11-23 17:49:55 +08:00
stonezdj(Daojun Zhang)
57aff88eb5
Add REST API to list job queue status, pause/resume job queue and list schedulers (#17707)
Add queue manager and redis client
  Update scheduler to add count and list

Signed-off-by: stonezdj <daojunz@vmware.com>

Signed-off-by: stonezdj <daojunz@vmware.com>
2022-11-17 20:12:07 +08:00
MinerYang
f20a2e433f
bump up golang to 1.19.3 (#17751)
Signed-off-by: yminer <yminer@vmware.com>

Signed-off-by: yminer <yminer@vmware.com>
2022-11-04 16:17:11 +08:00
erismaster
ec7717e23b
Add JFrog Artifactory As Supported Proxy-Cache Registry Source (#17738)
Add JFrog Artifactory As Supported Proxy-Cache

Enables the support of JFrog Artifactory as a source for proxy-cache. I
have tested this with a local build and was able to proxy images just
fine.

Signed-off-by: Derrik Campau <dcampau@vmware.com>

Signed-off-by: Derrik Campau <dcampau@vmware.com>
2022-11-04 12:50:34 +08:00
Chlins Zhang
e81067badb
fix: cherry pick 262 sql for migrations (#17735)
Signed-off-by: chlins <chenyuzh@vmware.com>
2022-11-03 10:05:46 +08:00
Chlins Zhang
c330b8c63a
feat: introduce the copy by chunk for replication (#17602)
1. Add sql migration to alter replication policy table
2. Implement the PullBlobChunk and PushBlobChunk for the underlying v2 registry client
3. Update image transfer logic to support copy by chunk
4. Update the replication policy API handler

Signed-off-by: chlins <chenyuzh@vmware.com>
2022-11-01 11:19:17 +08:00
MinerYang
6b8cdc03c1
bump up golang to 1.19.2 (#17694)
Signed-off-by: yminer <yminer@vmware.com>

Signed-off-by: yminer <yminer@vmware.com>
2022-10-26 20:28:19 +08:00
Shengwen YU
0acfbdc7a1
feat: bump TRIVYVERSION to v0.32.1 and bump TRIVYADAPTERVERSION to v0.30.2 (#17681)
Signed-off-by: Shengwen Yu <yshengwen@vmware.com>

Signed-off-by: Shengwen Yu <yshengwen@vmware.com>
2022-10-25 14:26:53 +08:00
MinerYang
83bc24f6c1
Bump up golang version to v1.19 (#17588)
Signed-off-by: yminer <yminer@vmware.com>

update
2022-09-22 17:38:26 +08:00
Yang Jiao
b44c9d01dd
Drop build postgresql 9.6 (#17458)
Drop pg9.6, will not support upgrading from pg9.6 to pg13, if you use pg9.6 you can upgrade to 2.5 and upgrade to 2.7

Signed-off-by: Yang Jiao <jiaoya@vmware.com>
2022-09-21 17:59:25 +08:00
MinerYang
306e780590
Add autoescape parameter for 2.5 & 2.6 jinja (#17439)
Signed-off-by: yminer <yminer@vmware.com>

update
2022-08-29 10:22:33 +08:00
Yang Jiao
1ea2ce6134
Update portal-base and nginx-base Dockerfile.base (#17442)
Installing nginx 1.22 creates the nginx group and nginx user, so instead
of creating them again, modify them.

Signed-off-by: Yang Jiao <jiaoya@vmware.com>
2022-08-24 14:48:09 +08:00
Shijun Sun
83bce02e61
Refactor swagger ui (#17428)
Signed-off-by: AllForNothing <sshijun@vmware.com>

Signed-off-by: AllForNothing <sshijun@vmware.com>
2022-08-23 12:03:45 +08:00
Soumik Majumder
861ca553df
Add autoescape parameter to jinja environments (#15770)
Signed-off-by: Soumik Majumder <soumikm@vmware.com>

Signed-off-by: Soumik Majumder <soumikm@vmware.com>
2022-08-23 11:02:16 +08:00
MinerYang
a272158023
add deprecation msg for chartmsuem and notary (#17398)
Signed-off-by: yminer <yminer@vmware.com>

adjust msg

adjust typo

adjust
2022-08-17 09:30:15 +08:00
MinerYang
bd102fbf7d
_version:2.6.0 correction in migration yml jinja (#17328)
Signed-off-by: yminer <yminer@vmware.com>
2022-08-05 16:54:16 +08:00
Chenyu Zhang
41105b5191
docs: add helpful description for cache layer configurations (#17317)
docs: add helpful description for cache layer configurations in harbor.yml.tmpl

Signed-off-by: chlins <chenyuzh@vmware.com>
2022-08-04 15:14:45 +08:00
Chenyu Zhang
70a95a9696
fix: reduce the high db cpu usage for tag retention (#17296)
1. Add two indexes to database migrations.
2. Skip refresh quota in middleware for requests from jobservice.
3. Refresh quota by self in the end of tag retention job.

Closes: #14708

Signed-off-by: chlins <chenyuzh@vmware.com>
2022-08-04 10:08:02 +08:00
MinerYang
0fbff49eb0
bumpup golang to v1.18.5 (#17307)
Signed-off-by: yminer <yminer@vmware.com>
2022-08-03 17:44:03 +08:00
MinerYang
bd1d441b01
bumpup golang version to v1.18.4 (#17257)
Signed-off-by: yminer <yminer@vmware.com>
2022-07-29 09:43:01 +08:00
Wang Yan
ef8b8f0be7
resolve the cve export volumn permission (#17157)
See the right uid and gid for the scandata_exports in the prepare

Signed-off-by: Wang Yan <wangyan@vmware.com>
2022-07-12 14:52:18 +08:00
prahaladdarkin
130452111b
Vulnerability scan data export functionality (#15998)
Vulnerability Scan Data (CVE) Export Functionality
Proposal - goharbor/community#174
Closes - https://github.com/goharbor/harbor/issues/17150
Changes:
* CVE Data export to CSV with filtering support.
* Implement CSV data export job for creating CSVs
* APIs to trigger CSV export job executions

Signed-off-by: prahaladdarkin <prahaladd@vmware.com>
2022-07-11 16:35:04 +08:00
Chenyu Zhang
41d10d571c
fix: repair execution status when it inconsistent (#17128)
Add migrations sql to repair the execution status when it does not
consistent with task status.

Closes: #17114

Signed-off-by: chlins <chenyuzh@vmware.com>
2022-07-06 17:02:03 +08:00
Chenyu Zhang
1a1ce634cc
Fix the process of cache layer (#17010)
fix: fix cache layer issues (#16995,#16997,#16996,#17038)

1. Load config and initialize cache layer in jobservice(for GC)
2. Cache artifact by digest the key should contains repository name
3. Repository cache cleanup error when update
4. Skip save cache when request ctx in transaction

Signed-off-by: chlins <chenyuzh@vmware.com>
2022-07-06 16:11:53 +08:00
MinerYang
8ba6a2bede
Add migration script for Harbor 2.6 (#17116)
add migration script for Harbor 2.6

Signed-off-by: yminer <yminer@vmware.com>
2022-07-06 14:08:24 +08:00
stonezdj(Daojun Zhang)
8115484f32
Create index for performance (#17022)
Add index to avoid full table scan
Signed-off-by: stonezdj <stonezdj@gmail.com>
2022-07-04 14:38:05 +08:00
Yang Jiao
77d28105bc
Upgrade pipenv to 2022.1.8 (#17093)
Signed-off-by: Yang Jiao <jiaoya@vmware.com>
2022-06-28 23:40:48 +08:00
MinerYang
b11970ac3c
update install htpasswd in prepare dockerfile (#17056)
update install htpasswd in prepare dockerfle

Signed-off-by: yminer <yminer@vmware.com>
2022-06-23 16:31:37 +08:00
Chenyu Zhang
0cf036e73a
migrate: add db index on artifact repository name (#17053)
Signed-off-by: chlins <chenyuzh@vmware.com>
2022-06-22 14:34:40 +08:00
MinerYang
541fbe784f
update support for docker compose v2 (#17039)
updte supportt for docker compose v2

Signed-off-by: yminer <yminer@vmware.com>

adjust install.sh

Signed-off-by: yminer <yminer@vmware.com>
2022-06-21 16:55:07 +08:00
Chenyu Zhang
5de1a62002
migrate: add db index on artifact repository name (#17035)
Signed-off-by: chlins <chenyuzh@vmware.com>
2022-06-20 16:01:04 +08:00
MinerYang
b8a71ac348
bump up golang version to v1.18.3 (#16957)
Signed-off-by: yminer <yminer@vmware.com>

update ci/ut_install.sh

Signed-off-by: yminer <yminer@vmware.com>
2022-06-08 17:56:14 +08:00
Chenyu Zhang
7ecd4a3f29
fix(prepare): validate expire hours when enable cache (#16949) (#16953)
Signed-off-by: chlins <chenyuzh@vmware.com>
2022-06-07 13:21:47 +08:00
Wilmar den Ouden
79600f3fee
feat: enabled Github GHCR as proxy cache (#16834)
Signed-off-by: wilmardo <info@wilmardenouden.nl>
2022-06-06 15:36:16 +08:00
Franz Nemeth
7c2e591c26
fix: add patch for registry layers larger than 10G with S3 backend (#16322)
add patch for registry layers larger than 10G with S3 backend

Signed-off-by: Franz Nemeth <franz.nemeth@dynatrace.com>
2022-06-02 16:51:29 +02:00