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:
KubeSphere CI Bot
2025-03-19 11:03:58 +08:00
committed by GitHub
parent d412777b97
commit 1564abca4d
8 changed files with 539 additions and 8 deletions

View File

@@ -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)
}