Merge pull request #9787 from ywk253100/191107_helmhub

Add adapter pattern for helm hub adapter
This commit is contained in:
Wenkai Yin(尹文开) 2019-11-12 18:00:27 +08:00 committed by GitHub
commit c415850527
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -16,6 +16,7 @@ package helmhub
import (
"errors"
"github.com/goharbor/harbor/src/common/utils/log"
adp "github.com/goharbor/harbor/src/replication/adapter"
"github.com/goharbor/harbor/src/replication/model"
@ -39,7 +40,17 @@ func (f *factory) Create(r *model.Registry) (adp.Adapter, error) {
// AdapterPattern ...
func (f *factory) AdapterPattern() *model.AdapterPattern {
return nil
return &model.AdapterPattern{
EndpointPattern: &model.EndpointPattern{
EndpointType: model.EndpointPatternTypeFix,
Endpoints: []*model.Endpoint{
{
Key: "hub.helm.sh",
Value: "https://hub.helm.sh",
},
},
},
}
}
type adapter struct {