fix namespace controller crash when openpitrix is not enabled (#2167)

This commit is contained in:
zryfish
2020-06-07 23:15:43 +08:00
committed by GitHub
parent 4f98fac39d
commit e7c5c5a1f3
2 changed files with 26 additions and 12 deletions

View File

@@ -186,6 +186,10 @@ func newAppManagerClient(endpoint string) (pb.AppManagerClient, error) {
// will return a nil client and nil error if endpoint is empty
func NewClient(options *Options) (Client, error) {
if options.IsEmpty() {
return nil, nil
}
runtimeMangerClient, err := newRuntimeManagerClient(options.RuntimeManagerEndpoint)
if err != nil {
klog.Error(err)