Commit Graph

1313 Commits

Author SHA1 Message Date
Shengwen YU 7103af0264
feat: bump up golang-runtime from 1.20.7 to 1.21.7 (#20046)
* feat: bump up golang-runtime from 1.20.7 to 1.21.7

Signed-off-by: Shengwen Yu <yshengwen@vmware.com>

* fix: update code to comply golangci-lint

Signed-off-by: Shengwen Yu <yshengwen@vmware.com>

* fix: update the mocks per the change of source code

Signed-off-by: Shengwen Yu <yshengwen@vmware.com>

---------

Signed-off-by: Shengwen Yu <yshengwen@vmware.com>
2024-02-29 19:33:29 +08:00
stonezdj(Daojun Zhang) cc328163a6
[cherry-pick]Limit URL to local site (#20024)
Limit URL to local site

Signed-off-by: stonezdj <daojunz@vmware.com>
Co-authored-by: stonezdj <daojunz@vmware.com>
2024-02-26 09:21:28 +00:00
MinerYang 7a43ecc9d2
(cherry-pick)fix storage.redirect.disable migrate template error release-2.8.0 (#19337)
fix storage.redirect.disable migrate template error

Signed-off-by: yminer <yminer@vmware.com>
2023-09-12 11:15:40 +08:00
Chlins Zhang ad3e767d51
fix: support customize cache db for business (#19184)
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-15 17:24:47 +08:00
Chlins Zhang 0de5006edf
[cherry-pick] chore: fix incorrect otel timeout in harbor yaml template (#19122)
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-15 10:09:41 +08:00
MinerYang adf8c73b3b
bump go 1.20.7 && install git for p4 base golang image (#19138)
upadte docker file

Signed-off-by: yminer <yminer@vmware.com>
2023-08-14 10:55:23 +08:00
MinerYang 19d6963523
bump golang1.20.6 on release-2.8.0& build golang based on photon (#18990)
Signed-off-by: yminer <yminer@vmware.com>

remove build_golang in ci script

fix typo

try to remove tdnf install make in registry/dockerfile.binary

optimize golang image
2023-07-27 13:41:02 +08:00
MinerYang 450e7e7884
bump upp distribution to v2.8.2 on release-2.8.0 (#18769)
Signed-off-by: yminer <yminer@vmware.com>
2023-05-31 14:11:07 +08:00
Chlins Zhang 48a2061d0b
fix: remove the 2.7.3 migration sql (#18658)
Signed-off-by: chlins <chenyuzh@vmware.com>
2023-05-09 16:50:24 +08:00
MinerYang 4af542d6d0
bump golang 1.20.4 on release-2.8.0 (#18648)
Signed-off-by: yminer <yminer@vmware.com>
2023-05-09 11:09:09 +08:00
Chlins Zhang 4f6efeb3d1
[cherry-pick] fix: improve the performance of list artifacts (#18639)
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:05:46 +08:00
MinerYang 405f975eab
[cherry-pick]allow redis password safe special characters on release-2.8.0 (#18587)
allow redis password safe special characters

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

string and None type conversion
2023-04-24 09:52:33 +08:00
MinerYang e20b05475f
bump golang 1.20.3 on release-2.8.0 (#18495)
Signed-off-by: yminer <yminer@vmware.com>
2023-04-10 09:27:11 +08:00
Chlins Zhang 72a6ef2514
style: adjust the style of migration SQL (#18475)
Signed-off-by: chlins <chenyuzh@vmware.com>
2023-04-04 17:37:27 +08:00
MinerYang de20659da5
bump golang 1.20.2 (#18469)
Signed-off-by: yminer <yminer@vmware.com>
2023-04-04 10:59:16 +08:00
Chlins Zhang cb0749c7ab
fix: add default payload_format for http type webhook (#18445)
1. Add migration SQL to handle the lost payload format for old policies.
2. Set payload format to 'Default' if not specified for http webhook in the API handler.
3. Fix the migration sql of notification_job

Fixes: #18401, #18453

Signed-off-by: chlins <chenyuzh@vmware.com>
2023-04-02 15:33:33 +08:00
Shengwen YU 208b7f4cb0
fix: add remove chartmuseum notice message (#18426)
Co-authored-by: Wang Yan <wangyan@vmware.com>
Co-authored-by: Orlix <OrlinVasilev@users.noreply.github.com>
2023-03-28 12:16:17 +03:00
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