Merge pull request #3894 from xyz-li/app-fix2

Fix: nil pointer when enable HTTPS
This commit is contained in:
KubeSphere CI Bot
2021-06-01 14:09:18 +08:00
committed by GitHub

View File

@@ -215,7 +215,11 @@ func (s *ServerRunOptions) NewAPIServer(stopCh <-chan struct{}) (*apiserver.APIS
if err != nil {
return nil, err
}
server.TLSConfig.Certificates = []tls.Certificate{certificate}
server.TLSConfig = &tls.Config{
Certificates: []tls.Certificate{certificate},
}
server.Addr = fmt.Sprintf(":%d", s.GenericServerRunOptions.SecurePort)
}
sch := scheme.Scheme