refactor authentication (#1951)

* refactor authentication

* refactor authentication
This commit is contained in:
zryfish
2020-03-15 23:26:32 +08:00
committed by GitHub
parent eb8a3c0dc6
commit 0a07e5f652
11 changed files with 60 additions and 52 deletions

View File

@@ -156,8 +156,8 @@ func (s *ServerRunOptions) NewAPIServer(stopCh <-chan struct{}) (*apiserver.APIS
}
var cacheClient cache.Interface
if s.CacheOptions.RedisURL != "" {
if s.CacheOptions.RedisURL == fakeInterface && s.DebugMode {
if s.CacheOptions.Host != "" {
if s.CacheOptions.Host == fakeInterface && s.DebugMode {
apiServer.CacheClient = cache.NewSimpleCache()
} else {
cacheClient, err = cache.NewRedisClient(s.CacheOptions, stopCh)