提交 6dcf1e4c 编写于 作者: J Jeff 提交者: zryfish

fix slow component status api

上级 24cbc083
......@@ -19,12 +19,9 @@ package components
import (
"fmt"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/klog"
"kubesphere.io/kubesphere/pkg/models"
"kubesphere.io/kubesphere/pkg/simple/client"
"kubesphere.io/kubesphere/pkg/informers"
"kubesphere.io/kubesphere/pkg/models"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/labels"
......@@ -93,12 +90,6 @@ func GetSystemHealthStatus() (*models.HealthStatus, error) {
status := &models.HealthStatus{}
componentStatuses, err := client.ClientSets().K8s().Kubernetes().CoreV1().ComponentStatuses().List(metav1.ListOptions{})
if err != nil {
return nil, err
}
status.KubernetesComponents = append(status.KubernetesComponents, componentStatuses.Items...)
// get kubesphere-system components
components, err := GetAllComponentsStatus()
if err != nil {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册