Commit Graph

55 Commits

Author SHA1 Message Date
DQ
af58195a29 Fix: Internal server error with messy code when chartmuseum not work
log err when doesn't get data from chart museum

Signed-off-by: DQ <dengq@vmware.com>
2019-07-17 15:14:50 +08:00
Qian Deng
f607c5177d Fix frontend failure caused by absolute path
Fix failures because front downlowd chart using relative path

Signed-off-by: Qian Deng <dengq@vmware.com>
2019-05-14 13:22:06 +08:00
Qian Deng
cd6c5a9f10 Enable absolute url in helm chart
assign public_url to chart-url
remove namespace merge in index.yaml

Signed-off-by: Qian Deng <dengq@vmware.com>
2019-05-14 12:56:20 +08:00
Steven Zou
7576800eb2
Merge pull request #7370 from burdzwastaken/fix/spelling-credentail
Fix misspellings of the word credential
2019-05-10 17:28:50 +08:00
Steven Zou
9bd2de3e35
Merge pull request #7452 from steven-zou/fix_issues_for_jobservice
Fix issues for jobservice
2019-04-24 16:15:43 +08:00
Steven Zou
823d9c04a9
Merge pull request #7497 from wy65701436/fix-replc-500
refine chart clint http response
2019-04-23 19:30:36 +08:00
wang yan
0d563fda9c refine chart clint http response
Chart client eats the http error if not status ok, after refactor, the
real http response will be catched in core api.

Signed-off-by: wang yan <wangyan@vmware.com>
2019-04-23 18:22:23 +08:00
wang yan
a3763466b3 Update err message to general information
Signed-off-by: wang yan <wangyan@vmware.com>
2019-04-23 10:57:31 +08:00
wang yan
1b4c75af25 Add event into upload ctx
Signed-off-by: wang yan <wangyan@vmware.com>
2019-04-23 10:57:31 +08:00
wang yan
df6e0600c9 Fix chart upload issue on event based
Use chart API to load the uploaded chart file to get the name and version

Signed-off-by: wang yan <wangyan@vmware.com>
2019-04-23 10:57:31 +08:00
Steven Zou
f8feaa192e add get scheduled and periodic executions APIs
Signed-off-by: Steven Zou <szou@vmware.com>
2019-04-19 13:54:23 +08:00
Steven Zou
1f481e492c Refactor job servcie primary logic to fix related bugs
Signed-off-by: Steven Zou <szou@vmware.com>
2019-04-18 16:02:49 +08:00
Wenkai Yin
2f1d2257d5 Remove the namespace concept in replication
Update the replication logic to remove the "namespace"

Signed-off-by: Wenkai Yin <yinw@vmware.com>
2019-04-16 08:36:42 +08:00
wang yan
7a373c2eed Add event trigger to helm upload/deletion replication
Signed-off-by: wang yan <wangyan@vmware.com>
2019-04-15 19:02:33 +08:00
Matt Burdan
7ba51dbac2
Fix misspellings of the word credential
Signed-off-by: Matt Burdan <burdz@burdz.net>
2019-04-12 20:37:41 -07:00
Steven Zou
5ccfa9f8ad Add retry with backoff when creating redis cache for chart server
Signed-off-by: Steven Zou <szou@vmware.com>
2018-11-28 22:23:03 +08:00
Steven Zou
b895fda13a Fix the malformat json data of chart list API
Signed-off-by: Steven Zou <szou@vmware.com>
2018-11-28 17:07:17 +08:00
Steven Zou
8b538cbc0a Return the total count of charts under the project in project API
- add new interface method to get total count of charts under namespaces by calling get index
- add new field 'chart_count' in project model
- append chart count to the project model in project API

Signed-off-by: Steven Zou <szou@vmware.com>
2018-09-25 17:56:11 +08:00
Steven Zou
78b9cbf35e Fix failures of UT cases of chart API related
Signed-off-by: Steven Zou <szou@vmware.com>
2018-09-21 14:02:45 +08:00
Steven Zou
d4c423ea8e Merge branch 'master' into return_labels_in_chart_api 2018-09-20 17:55:48 +08:00
Steven Zou
24c0be789d Add more UT cases for changed chart API
- add more cases in the ChartRepositoryAPI controller
- move chart utility testing functions to a separate go file under testing
- ignore testing coverage for testing folder
- update other UT cases to reflect the change of adding chart testing utility functions

Signed-off-by: Steven Zou <szou@vmware.com>
2018-09-20 17:51:27 +08:00
De Chen
970d84f1b9 Add comment format check to makefile and travis (#5832)
* Add comment format check to makefile and travis

Signed-off-by: 陈德 <chende@caicloud.io>
2018-09-20 11:48:38 +08:00
Steven Zou
e6de7f080d Rename the import path of new package 'label'
Signed-off-by: Steven Zou <szou@vmware.com>
2018-09-20 10:31:29 +08:00
Steven Zou
3a204dbf7d Rebase to fix conflicts 2018-09-19 17:46:47 +08:00
Qian Deng
7873a0312a Rename harbor-ui to harbor-core
1. Update the nginx.conf
2. Update Makefile
3. Update docker-compose
4. Update image name
5. Rename folder ui to core
6. Change the harbor-ui's package name to core
7. Remove unused static file on harbor-core
8. Remove unused code for harbor-portal

Signed-off-by: Qian Deng <dengq@vmware.com>
2018-09-19 16:35:13 +08:00
Steven Zou
df241c0666 Refactor the chart service implementation to provide more extemding flexibilities
- use unified proxy handler to handle all the proxy traffic
- define interfaces for the handlers
- implement the interface at chart controller level
- refactor UT cases
- update other related reference code

Signed-off-by: Steven Zou <szou@vmware.com>
2018-09-19 16:34:58 +08:00
Wenkai Yin
dfcd6f044d
Merge pull request #5888 from steven-zou/mark_labels_to_chart
Add API to support marking labels to charts
2018-09-14 15:09:46 +08:00
Steven Zou
7b8fe27c22 Add API to support marking labels to charts
- add related chart label API entries
- extract label related functionalities to a separate manager interface
- add a base controller for label related actions
- add related UT cases

Signed-off-by: Steven Zou <szou@vmware.com>
2018-09-14 13:27:50 +08:00
Steven Zou
a9f2ff2c91 Enhance the global search API to include chart searching result
- add chart search interface method in utility handler
- update the search API handler
- update the search API UT case

Signed-off-by: Steven Zou <szou@vmware.com>
2018-09-05 20:13:27 +08:00
陈德
0582db9a82 Apply consistent format for comments
Signed-off-by: 陈德 <chende@caicloud.io>
2018-09-05 16:16:31 +08:00
Steven Zou
7752595313
Merge pull request #5759 from steven-zou/support_delete_chart
Delete all the versions of the specified chart
2018-08-30 17:03:08 +08:00
Steven Zou
34f19f437d Delete all the versions of the specified chart
- add API route
- add DELETE chart method in utility handler of chart controller
- add UT case for the newly added methods
- update swagger.yaml to refelct the new change

Signed-off-by: Steven Zou <szou@vmware.com>
2018-08-30 16:31:05 +08:00
Steven Zou
12c6f1ada3 Append latest version of the chart when returning the chart list
- append `LatestVersion` to the `ChartInfo` model
- update the UT case to check the `LatestVersion`

Signed-off-by: Steven Zou <szou@vmware.com>
2018-08-30 14:43:41 +08:00
Steven Zou
4bf729caaf Sort the chart list before returning
- updatet the chart getting API
- update the corresponding UT case

Signed-off-by: Steven Zou <szou@vmware.com>
2018-08-29 15:26:21 +08:00
Wenkai Yin
2c5b06350e
Merge pull request #5716 from reasonerjt/update-go-import-path
Update import path in go code
2018-08-23 19:02:50 +08:00
Daniel Jiang
dcf4e2ee78 Update import path in go code
vmware -> goharbor

Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2018-08-23 17:50:53 +08:00
Steven Zou
d9256e401c Fix the issue of parsing redis connection address in chart API
- update logic in func parseRedisConfig

Signed-off-by: Steven Zou <szou@vmware.com>

- Add UT case for redis addr parsing func
2018-08-23 14:03:19 +08:00
Steven Zou
ecd8cc712d Add 'Deprecated' info for the chart
info returned by getting /charts include 'Deprecated' field
amend error message in the access checking logic
2018-08-06 16:31:41 +08:00
Steven Zou
bc6d7b69e7
Merge pull request #5524 from steven-zou/pro_deletable_enable
Enhance the project deletable checking logic to include helm charts checking
2018-08-06 16:00:38 +08:00
Steven Zou
b501199033 Enhance the project deletable checking logic to include helm charts checking
add utility handler in chart controller to support getting charts by ns
add ut case for utility handler
update deletable checking logic in project controller

refactor project deletable test case
2018-08-06 15:23:50 +08:00
Yan
6ed80a370d
Fix go gas issue for chartserver (#5522)
Add the error handling to fix go gas issue "Error unhandled"
2018-08-03 19:25:39 +08:00
Steven Zou
ce52f54e29 Fix issues described in #5464 and #5465
return unified error format by the chart repo API
update the prov file status at anytime
2018-08-02 14:07:04 +08:00
Steven Zou
4b1f0470ca Provide digital signature info of the related chart version 2018-07-27 15:07:22 +08:00
Steven Zou
9f0f959749 Fix the multipart form data content missing issue by refill the content again before passing to the backend server
refill the multipart form data at harbor API layer
export write error functions from the chartserver package
refactor the error format to be compatiable with push plugin
2018-07-24 10:32:20 +08:00
Steven Zou
2f0b706f84 Fix the issue of returning '* file not found' error
return default empty when file is not existing
2018-07-23 14:53:40 +08:00
Steven Zou
0227a1315a Keep the chart server related configurations in adminserver
append chart server related config options to the supporting list of adminserver
provide chart server related config access method in the API layer
update prepare script and ui env template file to enable cache driver config for chart server API
append flag info in the systeminfo API to indicate if chart server is deployed with Harbor
refactor the response rewriting logic to return structual error object
add api init method to initilizing objects required in API handlers
chage owner of the storage folder
update offline/online package scripts in Harbor-Util.robot
2018-07-20 19:40:33 +08:00
Steven Zou
b572e64a68 Refactor chart API endpoints
add /chartrepo after /api
add /chartrepo before /index.yaml,/:repo/index.yaml and /:repo/charts/:filename
add debug messages to the potential debug points
add more supporting mime types "multipart/form-data", "application/octet-stream" to the API endpoints

update travis file to inject ENV for UT cases of chart repo
2018-07-16 14:33:39 +08:00
Steven Zou
3a44f76b94 Add API routes of chart repo services in harbor API router
add chart repo API controller
update GetChartVersion to extract repo name from the request
update the corresponding UI cases

update the chart controller initialization process
2018-07-13 16:10:46 +08:00
Steven Zou
6ea9291c09 Refactor code after PR reviewing
pass cache config to the constructor of chart cache
use break loop to instead of return in GetIndexYaml
fix typo reids to redis
pass credential to the reverse proxy and chart client via constructors
2018-07-11 17:31:34 +08:00
Steven Zou
da4359f56b Add UT cases for the code of supporting chart repo server
add UT cases for cache
add UT cases for ChartOperator
add UT cases for the main API service of chart server
export some consts in the security.go of filter package to let them visible in chartserver package
2018-07-11 13:55:35 +08:00