add extra annotations

Signed-off-by: hongming <talonwan@yunify.com>
This commit is contained in:
hongming
2019-05-01 00:23:48 +08:00
committed by zryfish
parent 3e8035dc2b
commit 8e2acfa7f6
16 changed files with 162 additions and 59 deletions

View File

@@ -21,6 +21,7 @@ package metrics
import (
"github.com/golang/glog"
"kubesphere.io/kubesphere/pkg/informers"
"kubesphere.io/kubesphere/pkg/simple/client/kubesphere"
"net/url"
"regexp"
"runtime/debug"
@@ -1009,11 +1010,11 @@ func GetAllWorkspacesStatistics() *FormatedLevelMetric {
}()
go func() {
actNums, errAct := workspaces.GetAllAccountNums()
result, errAct := kubesphere.Client().ListUsers()
if errAct != nil {
glog.Errorln(errAct.Error())
}
accountResultItem = getSpecificMetricItem(timestamp, MetricNameWorkspaceAllAccountCount, WorkspaceResourceKindAccount, actNums, errAct)
accountResultItem = getSpecificMetricItem(timestamp, MetricNameWorkspaceAllAccountCount, WorkspaceResourceKindAccount, result.TotalCount, errAct)
wg.Done()
}()