From 106c2aad0bfc8b21ee2332fbc67b3b10e68f54b7 Mon Sep 17 00:00:00 2001 From: jeff Date: Wed, 28 Nov 2018 14:10:17 +0800 Subject: [PATCH] add kubesphere-monitoring-system to system monitoring component --- pkg/models/components.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkg/models/components.go b/pkg/models/components.go index 12142f9a..24c875a8 100644 --- a/pkg/models/components.go +++ b/pkg/models/components.go @@ -28,7 +28,7 @@ import ( ) // Namespaces need to watch -var SYSTEM_NAMESPACES = [...]string{"kubesphere-system", "openpitrix-system", "kube-system"} +var SYSTEM_NAMESPACES = [...]string{"kubesphere-system", "openpitrix-system", "kube-system", "kubesphere-monitoring-system"} type Component struct { Name string `json:"name"` @@ -134,7 +134,9 @@ func GetAllComponentsStatus() (map[string]interface{}, error) { nsStatus[service.Name] = component } - status[ns] = nsStatus + if len(nsStatus) > 0 { + status[ns] = nsStatus + } } return status, err -- GitLab