feat: add imagesearch provider (#6449)
* feat: add imagesearch provider * update * update * update * update url and queries * add func getProviderTypeByHost --------- Signed-off-by: wenhaozhou <wenhaozhou@yunify.com> Signed-off-by: hongming <coder.scala@gmail.com> Co-authored-by: wenhaozhou <wenhaozhou@yunify.com>
This commit is contained in:
committed by
GitHub
parent
d412777b97
commit
1564abca4d
@@ -26,6 +26,7 @@ import (
|
||||
"kubesphere.io/kubesphere/pkg/apiserver/options"
|
||||
"kubesphere.io/kubesphere/pkg/config"
|
||||
"kubesphere.io/kubesphere/pkg/models/auth"
|
||||
"kubesphere.io/kubesphere/pkg/models/registries/imagesearch"
|
||||
resourcev1beta1 "kubesphere.io/kubesphere/pkg/models/resources/v1beta1"
|
||||
"kubesphere.io/kubesphere/pkg/scheme"
|
||||
genericoptions "kubesphere.io/kubesphere/pkg/server/options"
|
||||
@@ -111,6 +112,10 @@ func (s *APIServerOptions) NewAPIServer(ctx context.Context) (*apiserver.APIServ
|
||||
return nil, fmt.Errorf("unable to setup identity provider: %v", err)
|
||||
}
|
||||
|
||||
if err := imagesearch.SharedImageSearchProviderController.WatchConfigurationChanges(ctx, apiServer.RuntimeCache); err != nil {
|
||||
return nil, fmt.Errorf("unable to setup image search provider: %v", err)
|
||||
}
|
||||
|
||||
if apiServer.ClusterClient, err = clusterclient.NewClusterClientSet(apiServer.RuntimeCache); err != nil {
|
||||
return nil, fmt.Errorf("unable to create cluster client: %v", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user