Commit Graph

40 Commits

Author SHA1 Message Date
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
Steven Zou
44cbb29664 Add cache support for the querying of chart details
support in memory cache
support redis cache
2018-07-08 11:17:55 +08:00
Steven Zou
7d782c41fc Implement the functions of getting chart version details and chart lists
getting chart list returns chart list instead of map and provides total versions info
getting chart details will return dependencies and values besides the metatdata of the chart version
2018-07-06 20:53:13 +08:00
Steven Zou
b65cc34c70 Implement a unified index.yaml entrypoint service to support namespace isolations
replace the helm package from github.com to k8s.io
implement /index.yaml service API
2018-07-05 18:07:00 +08:00
Steven Zou
ce4e5ac01d Implement the related handler methods of the transparent operations based on proxy
support index file
support object downloading
support health checking
support related manipulating operations except getting chart version
2018-07-03 21:36:20 +08:00
Steven Zou
54a0d10994 Define the related handlers to handler the requests of chart server/repo
add chartserver directory to put chart server code
add controller to coordinate the flow
add base/repo/manipulation handlers to handle requests
add operator to parse more details of chart version
call dep ensure
2018-07-02 19:34:04 +08:00