Merge pull request #3120 from yuswift/feature/lightweight-membercluster-installation
Feat: support runnig ks-apiserver without redis option && change log level
This commit is contained in:
@@ -129,7 +129,7 @@ func run(s *options.KubeSphereControllerManagerOptions, stopCh <-chan struct{})
|
||||
}
|
||||
}
|
||||
} else {
|
||||
klog.Info("Kubesphere-controller-manager starts without ldap option, it will not sync user into ldap")
|
||||
klog.Warning("ks-controller-manager starts without ldap provided, it will not sync user into ldap")
|
||||
}
|
||||
|
||||
var openpitrixClient openpitrix.Client
|
||||
|
||||
@@ -155,9 +155,7 @@ func (s *ServerRunOptions) NewAPIServer(stopCh <-chan struct{}) (*apiserver.APIS
|
||||
}
|
||||
|
||||
var cacheClient cache.Interface
|
||||
if s.RedisOptions == nil || len(s.RedisOptions.Host) == 0 {
|
||||
return nil, fmt.Errorf("redis service address MUST not be empty, please check configmap/kubesphere-config in kubesphere-system namespace")
|
||||
} else {
|
||||
if s.RedisOptions != nil && len(s.RedisOptions.Host) != 0 {
|
||||
if s.RedisOptions.Host == fakeInterface && s.DebugMode {
|
||||
apiServer.CacheClient = cache.NewSimpleCache()
|
||||
} else {
|
||||
@@ -167,6 +165,10 @@ func (s *ServerRunOptions) NewAPIServer(stopCh <-chan struct{}) (*apiserver.APIS
|
||||
}
|
||||
apiServer.CacheClient = cacheClient
|
||||
}
|
||||
} else {
|
||||
klog.Warning("ks-apiserver starts without redis provided, it will use in memory cache. " +
|
||||
"This may cause inconsistencies when running ks-apiserver with multiple replicas.")
|
||||
apiServer.CacheClient = cache.NewSimpleCache()
|
||||
}
|
||||
|
||||
if s.EventsOptions.Host != "" {
|
||||
|
||||
Reference in New Issue
Block a user