Commit Graph

1296 Commits

Author SHA1 Message Date
Wang Yan
deaecf2de5
add subject artifact repo (#18394)
add suject_artifact_repo column in the table artifact_accessory

Signed-off-by: Wang Yan <wangyan@vmware.com>
2023-03-22 21:48:09 +08:00
Chlins Zhang
395ae77d64
fix: change the default max retry count for webhook job to 3 (#18392)
Signed-off-by: chlins <chenyuzh@vmware.com>
2023-03-22 17:36:50 +08:00
Wang Yan
c1d297b015
fix 2.8 migration issue (#18389)
The sql must be idempotent

Signed-off-by: Wang Yan <wangyan@vmware.com>
2023-03-22 16:12:36 +08:00
Peter Jakubis
284d58453c
Change storage_service.redirect.disabled in harbor.yml.tmpl to storage_service.redirect.deactivate (#14615)
* set to disable

Signed-off-by: Peter Jakubis <balonik32@gmail.com>

* move pr-14615 prepare migration version from 2.7.0 to 2.8.0

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

---------

Signed-off-by: Peter Jakubis <balonik32@gmail.com>
Signed-off-by: yminer <yminer@vmware.com>
Co-authored-by: Peter Jakubis <peter.jakubis@piano.io>
Co-authored-by: Vadim Bauer <vb@container-registry.com>
Co-authored-by: Wang Yan <wangyan@vmware.com>
Co-authored-by: yminer <yminer@vmware.com>
2023-03-22 13:55:22 +08:00
Wang Yan
2f380495bf
revert subject id in the accessory (#18377)
DO not replact id with digest and just add digest into the accessory table

Signed-off-by: Wang Yan <wangyan@vmware.com>
2023-03-22 10:58:30 +08:00
stonezdj(Daojun Zhang)
46fa91f866
Fix dangling state execution (#18272)
Add max update hour and max dangling hour setting in config.yaml
  Fixes #17611

Signed-off-by: stonezdj <daojunz@vmware.com>
2023-03-21 18:48:14 +08:00
Chlins Zhang
67d3f9add8
feat: support configurate the http client timeout for webhook job (#18382)
Signed-off-by: chlins <chenyuzh@vmware.com>
2023-03-21 11:54:10 +08:00
Chlins Zhang
ff01efc777
fix: fix the webhook migration sql (#18374)
Signed-off-by: chlins <chenyuzh@vmware.com>
2023-03-19 10:27:06 +08:00
Chlins Zhang
14df2b2b60
feat: support configrate the jobservice logger sweeper duration (#18365)
Support configurate the jobservice logger sweeper duration from
harbor.yml.

Closes: #10958

Signed-off-by: chlins <chenyuzh@vmware.com>
2023-03-18 10:46:40 +08:00
Daniel Jiang
bea8dece07
feat: upgrade golang to 1.20.1 (#18370)
Signed-off-by: Shengwen Yu <yshengwen@vmware.com>
Co-authored-by: Shengwen Yu <yshengwen@vmware.com>
Co-authored-by: Wang Yan <wangyan@vmware.com>
2023-03-17 17:49:44 +08:00
MinerYang
e76aff6a0a
add external redis username config to support redis6 ACL (#18364)
add external redis username o support redis6 ACL

Signed-off-by: yminer <yminer@vmware.com>
2023-03-17 14:16:19 +08:00
Chlins Zhang
2148ee9fbe
migration: add sql to migrate the old webhook job to new way (#18342)
Signed-off-by: chlins <chenyuzh@vmware.com>
2023-03-16 16:27:43 +08:00
Yang Jiao
1e38565aae
Migrate robot account and notification policy related to Chartmuseum (#18316)
Migrate robot permission and notification policy related to Chartmuseum

Update robot permission and notification policy as Harbor v2.8.0 deprecates chartmuseum.
Harbor deprecates chartmuseum as of v2.8.0
Epic: goharbor#17958
Discussion: goharbor#15057

Signed-off-by: Yang Jiao <jiaoya@vmware.com>
2023-03-10 12:19:11 +08:00
Wang Yan
295260b7a3
replace subject id with digest (#18278)
Since it has to support push subject and accessories in either order, it has to replace digest with id

Signed-off-by: Wang Yan <wangyan@vmware.com>
2023-03-08 17:03:12 +08:00
stonezdj(Daojun Zhang)
5c0266e719
Get job log by job_id in worker (#18261)
Get job by job_id in redis

  Get the last 10MB of data if it exceeds 10MB

Signed-off-by: stonezdj <daojunz@vmware.com>
2023-03-06 13:19:10 +08:00
Yang Jiao
1f3f732bd6
Update the replication rule related to the Chartmuseum (#18274)
Update the registry and replication rule related to the Chartmuseum

Update replication_policy and registry as Harbor v2.8.0 deprecates chartmuseum.
Harbor deprecates chartmuseum as of v2.8.0
Epic: #17958
Discussion: #15057

Signed-off-by: Yang Jiao <jiaoya@vmware.com>
2023-03-02 17:28:27 +08:00
Shijun Sun
9973d99f3e
Remove chart api (#18265)
* remove chart api from swagger

Delete the api path for chart in the swagger

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

* Remove chart APIs
   1. Remove some chart-related steps for Dockerfile for portal  container
   2. Remove chart APIs for API center

Signed-off-by: AllForNothing <sshijun@vmware.com>

---------

Signed-off-by: Wang Yan <wangyan@vmware.com>
Signed-off-by: AllForNothing <sshijun@vmware.com>
Co-authored-by: Wang Yan <wangyan@vmware.com>
2023-02-24 14:47:42 +08:00
Yang Jiao
f4f80ca8fb
Update DB Dockerfile.base (#18249)
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 17:20:53 +08:00
stonezdj(Daojun Zhang)
d03f0dcf2d
Skip to update pull time and pull count for scanner robot account (#17807)
Add prefix for scanner robot account
   Fixes #14638

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

# Conflicts:
#	api/v2.0/swagger.yaml
#	src/common/const.go
#	src/lib/config/metadata/metadatalist.go
2023-02-20 15:09:21 +08:00
Wang Yan
738fde7d3b
remove chartmuseum backend (#18191)
Harbor deprecates chartmuseum as of v2.8.0

Epic: https://github.com/goharbor/harbor/issues/17958

Discussion: https://github.com/goharbor/harbor/discussions/15057

Signed-off-by: Wang Yan <wangyan@vmware.com>
2023-02-16 18:11:05 +08:00
Chlins Zhang
bfe4362a67
fix: remove the scan exports volume (#18107)
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 17:30:47 +08:00
François Deppierraz
341cc4510d
Fix a typo in make/photo/Makefile (#18111) 2023-01-17 18:39:40 +02:00
Shijun Sun
2361ae161f
Upgrade Angular and Clarity to the latest version (#18059)
Upgrade Angular and Clarity
  1.Upgrade related libraries
  2.Fix breaking changes

Signed-off-by: AllForNothing <sshijun@vmware.com>

Signed-off-by: AllForNothing <sshijun@vmware.com>
2023-01-05 10:42:59 +08:00
asta1992
6e51dc0161
Fix: Small typos in harbor.yml.tmpl (#18009)
Signed-off-by: Andreas Stalder <andreas.stalder@terreactive.ch>
2022-12-21 09:56:12 +08:00
MinerYang
d168f080ed
bump up golang to 1.19.4 for main (#17997)
bump up golang to 1.19.4 in main

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

Signed-off-by: yminer <yminer@vmware.com>
2022-12-15 13:55:30 +08:00
Wang Yan
74dfc905ec
remove the redundant data from table artifact_blob (#17937)
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-13 15:32:57 +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