Merge remote-tracking branch 'goodrain/V5.2' into i2310

This commit is contained in:
GLYASAI 2020-07-24 13:39:07 +08:00
commit 5aad9c6d67
26 changed files with 687 additions and 382 deletions

View File

@ -887,7 +887,10 @@ func (s *ServiceAction) GetTenantRes(uuid string) (*api_model.TenantResource, er
AllocatedCPU += ser.ContainerCPU * ser.Replicas
AllocatedMEM += ser.ContainerMemory * ser.Replicas
}
tenantResUesd, _ := s.statusCli.GetTenantResource(uuid)
tenantResUesd, err := s.statusCli.GetTenantResource(uuid)
if err != nil {
logrus.Errorf("get tenant %s resource failure %s", uuid, err.Error())
}
disks := GetServicesDisk(strings.Split(serviceIDs, ","), GetPrometheusProxy())
var value float64
for _, v := range disks {
@ -899,8 +902,10 @@ func (s *ServiceAction) GetTenantRes(uuid string) (*api_model.TenantResource, er
res.EID = tenant.EID
res.AllocatedCPU = AllocatedCPU
res.AllocatedMEM = AllocatedMEM
res.UsedCPU = int(tenantResUesd.CpuRequest)
res.UsedMEM = int(tenantResUesd.MemoryRequest)
if tenantResUesd != nil {
res.UsedCPU = int(tenantResUesd.CpuRequest)
res.UsedMEM = int(tenantResUesd.MemoryRequest)
}
res.UsedDisk = value
return &res, nil
}

View File

@ -66,20 +66,34 @@ func CreateTenManager(mqc mqclient.MQClient, statusCli *client.AppRuntimeSyncCli
//BindTenantsResource query tenant resource used and sort
func (t *TenantAction) BindTenantsResource(source []*dbmodel.Tenants) api_model.TenantList {
var list api_model.TenantList
var resources = make(map[string]*pb.TenantResource, len(source))
if len(source) == 1 {
re, err := t.statusCli.GetTenantResource(source[0].UUID)
if err != nil {
logrus.Errorf("get tenant %s resource failure %s", source[0].UUID, err.Error())
}
if re != nil {
resources[source[0].UUID] = re
}
} else {
res, err := t.statusCli.GetAllTenantResource()
if err != nil {
logrus.Errorf("get all tenant resource failure %s", err.Error())
}
if res != nil {
resources = res.Resources
}
}
for i, ten := range source {
re, _ := t.statusCli.GetTenantResource(ten.UUID)
var item = &api_model.TenantAndResource{
Tenants: *source[i],
}
re := resources[ten.UUID]
if re != nil {
item.CPULimit = re.CpuLimit
item.CPURequest = re.CpuRequest
item.MemoryLimit = re.MemoryLimit
item.MemoryRequest = re.MemoryRequest
item.UnscdCPULimit = re.UnscdCpuLimit
item.UnscdCPUReq = re.UnscdCpuReq
item.UnscdMemoryLimit = re.UnscdMemoryLimit
item.UnscdMemoryReq = re.UnscdMemoryReq
item.RunningAppNum = re.RunningAppNum
item.RunningAppInternalNum = re.RunningAppInternalNum
item.RunningAppThirdNum = re.RunningAppThirdNum
@ -266,8 +280,25 @@ func (t *TenantAction) GetTenantsResources(tr *api_model.TenantResources) (map[s
return nil, fmt.Errorf("error getting allocatalbe cpu and memory: %v", err)
}
var result = make(map[string]map[string]interface{}, len(ids))
var resources = make(map[string]*pb.TenantResource, len(ids))
if len(ids) == 1 {
re, err := t.statusCli.GetTenantResource(ids[0])
if err != nil {
logrus.Errorf("get tenant %s resource failure %s", ids[0], err.Error())
}
if re != nil {
resources[ids[0]] = re
}
} else {
res, err := t.statusCli.GetAllTenantResource()
if err != nil {
logrus.Errorf("get all tenant resource failure %s", err.Error())
}
if res != nil {
resources = res.Resources
}
}
for _, tenantID := range ids {
tr, _ := t.statusCli.GetTenantResource(tenantID)
var limitMemory int64
if l, ok := limits[tenantID]; ok && l != 0 {
limitMemory = int64(l)
@ -278,11 +309,17 @@ func (t *TenantAction) GetTenantsResources(tr *api_model.TenantResources) (map[s
"tenant_id": tenantID,
"limit_memory": limitMemory,
"limit_cpu": clusterStats.AllCPU,
"service_running_num": tr.RunningAppNum,
"service_total_num": serviceTenantCount[tenantID],
"cpu": tr.CpuRequest,
"memory": tr.MemoryRequest,
"disk": 0,
"service_running_num": 0,
"cpu": 0,
"memory": 0,
}
tr, _ := resources[tenantID]
if tr != nil {
result[tenantID]["service_running_num"] = tr.RunningAppNum
result[tenantID]["cpu"] = tr.CpuRequest
result[tenantID]["memory"] = tr.MemoryRequest
}
}
//query disk used in prometheus
@ -386,14 +423,18 @@ func (t *TenantAction) GetAllocatableResources() (*ClusterResourceStats, error)
t.cacheClusterResourceStats = &crs
t.cacheTime = time.Now()
}
ts, err := t.statusCli.GetTenantResource("")
ts, err := t.statusCli.GetAllTenantResource()
if err != nil {
logrus.Errorf("get tenant resource failure %s", err.Error())
}
crs := t.cacheClusterResourceStats
if ts != nil {
crs.RequestCPU = ts.CpuRequest
crs.RequestMemory = ts.MemoryRequest
crs.RequestCPU = 0
crs.RequestMemory = 0
for _, re := range ts.Resources {
crs.RequestCPU += re.CpuRequest
crs.RequestMemory += re.MemoryRequest
}
}
return crs, nil
}

View File

@ -14,29 +14,23 @@ func CheckTenantResource(tenant *dbmodel.Tenants, needMemory int) error {
}
logrus.Debugf("tenant limitMemory: %v, usedMemory: %v", tenant.LimitMemory, ts.UsedMEM)
if tenant.LimitMemory != 0 {
//tenant.LimitMemory: 租户的总资源 ts.UsedMEM: 租户使用的资源
avaiMemory := tenant.LimitMemory - ts.UsedMEM
if needMemory > avaiMemory {
logrus.Error("超出租户可用资源")
logrus.Errorf("tenant available memory is %d, To apply for %d, not enough", avaiMemory, needMemory)
return errors.New("tenant_lack_of_memory")
}
}
clusterInfo, err := GetTenantManager().GetAllocatableResources() //节点可用资源
clusterInfo, err := GetTenantManager().GetAllocatableResources()
if err != nil {
return err
logrus.Errorf("get cluster resources failure for check tenant resource.", err.Error())
}
logrus.Debugf("cluster allocatedMemory: %v, tenantsUsedMemory; %v", clusterInfo.AllMemory, clusterInfo.RequestMemory)
// clusterInfo.AllMemory: 集群总资源 clusterInfo.RequestMemory: 集群已使用资源
clusterAvailMemory := clusterInfo.AllMemory - clusterInfo.RequestMemory
if int64(needMemory) > clusterAvailMemory {
logrus.Error("超出集群可用资源")
return errors.New("cluster_lack_of_memory")
if clusterInfo != nil {
clusterAvailMemory := clusterInfo.AllMemory - clusterInfo.RequestMemory
logrus.Debugf("cluster allocatedMemory: %v, availmemory %d tenantsUsedMemory; %v", clusterInfo.RequestMemory, clusterAvailMemory, clusterInfo.RequestMemory)
if int64(needMemory) > clusterAvailMemory {
logrus.Errorf("cluster available memory is %d, To apply for %d, not enough", clusterAvailMemory, needMemory)
return errors.New("cluster_lack_of_memory")
}
}
return nil
}

View File

@ -74,10 +74,6 @@ type TenantAndResource struct {
CPULimit int64 `json:"cpu_limit"`
MemoryRequest int64 `json:"memory_request"`
MemoryLimit int64 `json:"memory_limit"`
UnscdCPUReq int64 `json:"unscd_cpu_req"`
UnscdCPULimit int64 `json:"unscd_cpu_limit"`
UnscdMemoryReq int64 `json:"unscd_memory_req"`
UnscdMemoryLimit int64 `json:"unscd_memory_limit"`
RunningAppNum int64 `json:"running_app_num"`
RunningAppInternalNum int64 `json:"running_app_internal_num"`
RunningAppThirdNum int64 `json:"running_app_third_num"`
@ -95,16 +91,21 @@ func (list TenantList) Len() int {
}
func (list TenantList) Less(i, j int) bool {
if list[i].Tenants.LimitMemory < list[j].Tenants.LimitMemory {
return true
// Highest priority
if list[i].MemoryRequest > list[j].MemoryRequest {
return false
}
if list[i].RunningAppNum < list[j].RunningAppNum {
return true
if list[i].CPURequest > list[j].CPURequest {
return false
}
if list[i].MemoryRequest < list[j].MemoryRequest {
return true
if list[i].RunningAppNum > list[j].RunningAppNum {
return false
}
return false
// Minimum priority
if list[i].Tenants.LimitMemory > list[j].Tenants.LimitMemory {
return false
}
return true
}
func (list TenantList) Swap(i, j int) {

50
api/model/tenant_test.go Normal file
View File

@ -0,0 +1,50 @@
// RAINBOND, Application Management Platform
// Copyright (C) 2020-2020 Goodrain Co., Ltd.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version. For any non-GPL usage of Rainbond,
// one or multiple Commercial Licenses authorized by Goodrain Co., Ltd.
// must be obtained first.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
package model
import (
"sort"
"testing"
)
func TestTenantList(t *testing.T) {
var tenants TenantList
t1 := &TenantAndResource{
MemoryRequest: 100,
}
t1.LimitMemory = 30
tenants.Add(t1)
t2 := &TenantAndResource{
MemoryRequest: 80,
}
t2.LimitMemory = 40
tenants.Add(t2)
t3 := &TenantAndResource{
MemoryRequest: 80,
}
t3.LimitMemory = 60
tenants.Add(t3)
sort.Sort(sort.Reverse(tenants))
for _, ten := range tenants {
t.Logf("%+v", ten)
}
}

View File

@ -40,7 +40,7 @@ type VersionInfo struct {
DeliveredPath string `gorm:"column:delivered_path;size:250" json:"delivered_path"` //交付物path
ImageName string `gorm:"column:image_name;size:250" json:"image_name"` //运行镜像名称
Cmd string `gorm:"column:cmd;size:200" json:"cmd"` //启动命令
RepoURL string `gorm:"column:repo_url;size:100" json:"repo_url"`
RepoURL string `gorm:"column:repo_url;size:2047" json:"repo_url"`
CodeVersion string `gorm:"column:code_version;size:40" json:"code_version"`
CodeBranch string `gorm:"column:code_branch;size:40" json:"code_branch"`
CommitMsg string `gorm:"column:code_commit_msg;size:200" json:"code_commit_msg"`

View File

@ -106,11 +106,11 @@ func (t *TenantDaoImpl) GetALLTenants(query string) ([]*model.Tenants, error) {
func (t *TenantDaoImpl) GetTenantByEid(eid, query string) ([]*model.Tenants, error) {
var tenants []*model.Tenants
if query != "" {
if err := t.DB.Where("eid = ? and name like '%?%'", query).Find(&tenants).Error; err != nil {
if err := t.DB.Where("eid = ? and name like '%?%'", eid, query).Find(&tenants).Error; err != nil {
return nil, err
}
} else {
if err := t.DB.Where("eid = ?", query).Find(&tenants).Error; err != nil {
if err := t.DB.Where("eid = ?", eid).Find(&tenants).Error; err != nil {
return nil, err
}
}

View File

@ -27,9 +27,9 @@ import (
"github.com/Sirupsen/logrus"
"github.com/coreos/etcd/clientv3"
client "github.com/coreos/etcd/clientv3"
etcdnaming "github.com/coreos/etcd/clientv3/naming"
"github.com/goodrain/rainbond/util"
etcdutil "github.com/goodrain/rainbond/util/etcd"
grpcutil "github.com/goodrain/rainbond/util/grpc"
"google.golang.org/grpc/naming"
)
@ -44,7 +44,7 @@ type KeepAlive struct {
LID clientv3.LeaseID
Done chan struct{}
etcdClient *client.Client
gRPCResolver *etcdnaming.GRPCResolver
gRPCResolver *grpcutil.GRPCResolver
once sync.Once
}
@ -65,6 +65,7 @@ func CreateKeepAlive(etcdClientArgs *etcdutil.ClientArgs, ServerName string, Pro
ctx, cancel := context.WithCancel(context.Background())
etcdclient, err := etcdutil.NewClient(ctx, etcdClientArgs)
if err != nil {
cancel()
return nil, err
}
@ -127,7 +128,7 @@ func (k *KeepAlive) etcdKey() string {
}
func (k *KeepAlive) reg() error {
k.gRPCResolver = &etcdnaming.GRPCResolver{Client: k.etcdClient}
k.gRPCResolver = &grpcutil.GRPCResolver{Client: k.etcdClient}
ctx, cancel := context.WithTimeout(context.Background(), time.Second*5)
defer cancel()
resp, err := k.etcdClient.Grant(ctx, k.TTL+3)

View File

@ -172,8 +172,7 @@ func (m *manager) UpdateEndpoints(endpoints ...*config.Endpoint) {
eventServer = append(eventServer, k)
}
m.eventServer = eventServer
logrus.Infof("update event handle core success,handle core count:%d, event server count:%d", len(m.handles), len(m.eventServer))
logrus.Debugf("update event handle core success,handle core count:%d, event server count:%d", len(m.handles), len(m.eventServer))
}
func (m *manager) Error(err error) {

View File

@ -24,7 +24,6 @@ import (
"io"
"os"
"path"
"sort"
"strconv"
"strings"
"time"
@ -87,14 +86,23 @@ func (a MessageDataList) Less(i, j int) bool { return a[i].Unixtime <= a[j].Unix
//GetMessages GetMessages
func (m *EventFilePlugin) GetMessages(eventID, level string, length int) (interface{}, error) {
var message MessageDataList
apath := path.Join(m.HomePath, "eventlog", eventID+".log")
if ok, err := util.FileExists(apath); !ok {
if err != nil {
logrus.Errorf("check file exist error %s", err.Error())
}
return message, nil
}
eventFile, err := os.Open(apath)
if err != nil {
if os.IsNotExist(err) {
return nil, nil
}
return nil, err
}
defer eventFile.Close()
reader := bufio.NewReader(eventFile)
var message MessageDataList
for {
line, _, err := reader.ReadLine()
if err != nil {
@ -124,8 +132,6 @@ func (m *EventFilePlugin) GetMessages(eventID, level string, length int) (interf
}
}
}
//Multi-node eventlog is valid.
sort.Sort(message)
return message, nil
}

View File

@ -33,6 +33,8 @@ import (
type Etcd struct {
discover.Callback
Prometheus *prometheus.Manager
Scheme string
TLSConfig prometheus.TLSConfig
sortedEndpoints []string
}
@ -66,8 +68,9 @@ func (e *Etcd) toScrape() *prometheus.ScrapeConfig {
ts = append(ts, end)
}
return &prometheus.ScrapeConfig{
sc := &prometheus.ScrapeConfig{
JobName: e.Name(),
Scheme: e.Scheme,
ScrapeInterval: model.Duration(1 * time.Minute),
ScrapeTimeout: model.Duration(30 * time.Second),
MetricsPath: "/metrics",
@ -82,4 +85,10 @@ func (e *Etcd) toScrape() *prometheus.ScrapeConfig {
},
},
}
if e.Scheme == "https" {
sc.HTTPClientConfig = prometheus.HTTPClientConfig{
TLSConfig: e.TLSConfig,
}
}
return sc
}

View File

@ -61,7 +61,20 @@ func (d *Monitor) Start() {
go d.discoverNodes(&callback.Node{Prometheus: d.manager}, &callback.App{Prometheus: d.manager}, d.ctx.Done())
// monitor etcd members
go d.discoverEtcd(&callback.Etcd{Prometheus: d.manager}, d.ctx.Done())
go d.discoverEtcd(&callback.Etcd{
Prometheus: d.manager,
Scheme: func() string {
if d.config.EtcdCertFile != "" {
return "https"
}
return "http"
}(),
TLSConfig: prometheus.TLSConfig{
CAFile: d.config.EtcdCaFile,
CertFile: d.config.EtcdCertFile,
KeyFile: d.config.EtcdKeyFile,
},
}, d.ctx.Done())
// monitor Cadvisor
go d.discoverCadvisor(&callback.Cadvisor{

View File

@ -19,10 +19,11 @@
package prometheus
import (
"github.com/prometheus/common/model"
"net/url"
"regexp"
"time"
"github.com/prometheus/common/model"
)
// Config is the top-level configuration for Prometheus's config files.

View File

@ -187,13 +187,6 @@ func NewRulesManager(config *option.Config) *AlertingRulesManager {
Labels: commonLables,
Annotations: map[string]string{"summary": "mq unhealthy"},
},
&RulesConfig{
Alert: "TeamTaskMany",
Expr: "acp_mq_dequeue_number-acp_mq_enqueue_number > 200",
For: "3m",
Labels: commonLables,
Annotations: map[string]string{"summary": "The number of tasks in the queue is greater than 200"},
},
},
},
&AlertingNameConfig{

View File

@ -33,6 +33,11 @@ import (
func TrimAndSort(endpoints []*config.Endpoint) []string {
arr := make([]string, 0, len(endpoints))
for _, end := range endpoints {
if strings.HasPrefix(end.URL, "https://") {
url := strings.TrimLeft(end.URL, "https://")
arr = append(arr, url)
continue
}
url := strings.TrimLeft(end.URL, "http://")
arr = append(arr, url)
}

View File

@ -25,8 +25,8 @@ import (
"github.com/Sirupsen/logrus"
"github.com/goodrain/rainbond/mq/api/grpc/pb"
etcdutil "github.com/goodrain/rainbond/util/etcd"
grpcutil "github.com/goodrain/rainbond/util/grpc"
context "golang.org/x/net/context"
grpc "google.golang.org/grpc"
)
@ -62,7 +62,7 @@ func NewMqClient(etcdClientArgs *etcdutil.ClientArgs, defaultserver string) (MQC
if err != nil {
return nil, err
}
r := &GRPCResolver{Client: c}
r := &grpcutil.GRPCResolver{Client: c}
b := grpc.RoundRobin(r)
conn, err = grpc.DialContext(ctx, "/rainbond/discover/rainbond_mq", grpc.WithBalancer(b), grpc.WithInsecure())
if err != nil {

View File

@ -158,12 +158,8 @@ func conversionServicePlugin(as *typesv1.AppService, dbmanager db.Manager) ([]v1
func createTCPDefaultPluginContainer(as *typesv1.AppService, pluginID string, envs []v1.EnvVar) v1.Container {
envs = append(envs, v1.EnvVar{Name: "PLUGIN_ID", Value: pluginID})
_, xdsHostPort, apiHostPort := getXDSHostIPAndPort()
envs = append(envs, v1.EnvVar{Name: "XDS_HOST_IP", ValueFrom: &corev1.EnvVarSource{
FieldRef: &corev1.ObjectFieldSelector{
FieldPath: "status.hostIP",
},
}})
xdsHost, xdsHostPort, apiHostPort := getXDSHostIPAndPort()
envs = append(envs, xdsHostIPEnv(xdsHost))
envs = append(envs, v1.EnvVar{Name: "API_HOST_PORT", Value: apiHostPort})
envs = append(envs, v1.EnvVar{Name: "XDS_HOST_PORT", Value: xdsHostPort})
@ -177,12 +173,8 @@ func createTCPDefaultPluginContainer(as *typesv1.AppService, pluginID string, en
func createProbeMeshInitContainer(as *typesv1.AppService, pluginID, serviceAlias string, envs []v1.EnvVar) v1.Container {
envs = append(envs, v1.EnvVar{Name: "PLUGIN_ID", Value: pluginID})
_, xdsHostPort, apiHostPort := getXDSHostIPAndPort()
envs = append(envs, v1.EnvVar{Name: "XDS_HOST_IP", ValueFrom: &corev1.EnvVarSource{
FieldRef: &corev1.ObjectFieldSelector{
FieldPath: "status.hostIP",
},
}})
xdsHost, xdsHostPort, apiHostPort := getXDSHostIPAndPort()
envs = append(envs, xdsHostIPEnv(xdsHost))
envs = append(envs, v1.EnvVar{Name: "API_HOST_PORT", Value: apiHostPort})
envs = append(envs, v1.EnvVar{Name: "XDS_HOST_PORT", Value: xdsHostPort})
return v1.Container{
@ -340,15 +332,7 @@ func createPluginEnvs(pluginID, tenantID, serviceAlias string, mainEnvs []v1.Env
envs = append(envs, v1.EnvVar{Name: e.EnvName, Value: e.EnvValue})
}
xdsHost, xdsHostPort, apiHostPort := getXDSHostIPAndPort()
if xdsHost != "" {
envs = append(envs, v1.EnvVar{Name: "XDS_HOST_IP", ValueFrom: &corev1.EnvVarSource{
FieldRef: &corev1.ObjectFieldSelector{
FieldPath: "status.hostIP",
},
}})
} else {
envs = append(envs, v1.EnvVar{Name: "XDS_HOST_IP", Value: xdsHost})
}
envs = append(envs, xdsHostIPEnv(xdsHost))
envs = append(envs, v1.EnvVar{Name: "API_HOST_PORT", Value: apiHostPort})
envs = append(envs, v1.EnvVar{Name: "XDS_HOST_PORT", Value: xdsHostPort})
discoverURL := fmt.Sprintf(
@ -413,3 +397,14 @@ func createTCPUDPMeshRecources(as *typesv1.AppService) v1.ResourceRequirements {
return cpu
}())
}
func xdsHostIPEnv(xdsHost string) corev1.EnvVar {
if xdsHost == "" {
return v1.EnvVar{Name: "XDS_HOST_IP", ValueFrom: &corev1.EnvVarSource{
FieldRef: &corev1.ObjectFieldSelector{
FieldPath: "status.hostIP",
},
}}
}
return v1.EnvVar{Name: "XDS_HOST_IP", Value: xdsHost}
}

View File

@ -0,0 +1,147 @@
// RAINBOND, Application Management Platform
// Copyright (C) 2020-2020 Goodrain Co., Ltd.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version. For any non-GPL usage of Rainbond,
// one or multiple Commercial Licenses authorized by Goodrain Co., Ltd.
// must be obtained first.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
package store
import (
"sync"
"github.com/Sirupsen/logrus"
corev1 "k8s.io/api/core/v1"
)
//ResourceCache resource cache
type ResourceCache struct {
lock sync.Mutex
resources map[string]*NamespaceResource
}
//NewResourceCache new resource cache
func NewResourceCache() *ResourceCache {
return &ResourceCache{
resources: make(map[string]*NamespaceResource),
}
}
//NamespaceResource namespace resource
type NamespaceResource map[string]*PodResource
//SetPodResource set pod resource
func (r *NamespaceResource) SetPodResource(podName string, pr *PodResource) {
(*r)[podName] = pr
}
//RemovePod remove pod resource
func (r *NamespaceResource) RemovePod(podName string) {
delete(*r, podName)
}
//PodResource resource struct
type PodResource struct {
MemoryRequest int64
MemoryLimit int64
CPURequest int64
CPULimit int64
NodeName string
}
//TenantResource tenant resource
type TenantResource struct {
Namespace string
MemoryRequest int64
MemoryLimit int64
CPURequest int64
CPULimit int64
}
//SetPodResource set pod resource
func (r *ResourceCache) SetPodResource(pod *corev1.Pod) {
r.lock.Lock()
defer r.lock.Unlock()
namespace := pod.Namespace
re := calculatePodResource(pod)
if nr, ok := r.resources[namespace]; ok && nr != nil {
nr.SetPodResource(pod.Name, re)
} else {
nameR := make(NamespaceResource)
nameR.SetPodResource(pod.Name, re)
r.resources[namespace] = &nameR
}
logrus.Debugf("set namespace %s pod %s resource", namespace, pod.Name)
}
//RemovePod remove pod resource
func (r *ResourceCache) RemovePod(pod *corev1.Pod) {
r.lock.Lock()
defer r.lock.Unlock()
namespace := pod.Namespace
if nr, ok := r.resources[namespace]; ok && nr != nil {
nr.RemovePod(pod.Name)
}
}
//GetTenantResource get tenant resource
func (r *ResourceCache) GetTenantResource(namespace string) (tr TenantResource) {
r.lock.Lock()
defer r.lock.Unlock()
tr = r.getTenantResource(r.resources[namespace])
tr.Namespace = namespace
return tr
}
func (r *ResourceCache) getTenantResource(namespaceRe *NamespaceResource) (tr TenantResource) {
if namespaceRe == nil {
return
}
for _, v := range *namespaceRe {
tr.CPULimit += v.CPULimit
tr.MemoryLimit += v.MemoryLimit
tr.CPURequest += v.CPURequest
tr.MemoryRequest += v.MemoryRequest
}
return
}
//GetAllTenantResource get all tenant resources
func (r *ResourceCache) GetAllTenantResource() (trs []TenantResource) {
r.lock.Lock()
defer r.lock.Unlock()
for k := range r.resources {
tr := r.getTenantResource(r.resources[k])
tr.Namespace = k
trs = append(trs, tr)
}
return
}
func calculatePodResource(pod *corev1.Pod) *PodResource {
for _, con := range pod.Status.Conditions {
if con.Type == corev1.PodScheduled && con.Status == corev1.ConditionFalse {
return &PodResource{}
}
}
var pr PodResource
for _, con := range pod.Spec.Containers {
pr.MemoryRequest += con.Resources.Requests.Memory().Value()
pr.CPURequest += con.Resources.Requests.Cpu().MilliValue()
pr.MemoryLimit += con.Resources.Limits.Memory().Value()
pr.CPULimit += con.Resources.Limits.Cpu().MilliValue()
}
pr.NodeName = pod.Spec.NodeName
return &pr
}

View File

@ -21,12 +21,13 @@ package store
import (
"context"
"fmt"
"github.com/goodrain/rainbond/util/constants"
"k8s.io/apimachinery/pkg/types"
"os"
"sync"
"time"
"github.com/goodrain/rainbond/util/constants"
"k8s.io/apimachinery/pkg/types"
"github.com/Sirupsen/logrus"
"github.com/eapache/channels"
"github.com/goodrain/rainbond/cmd/worker/option"
@ -46,7 +47,6 @@ import (
"k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/client-go/informers"
"k8s.io/client-go/kubernetes"
listcorev1 "k8s.io/client-go/listers/core/v1"
@ -69,7 +69,8 @@ type Storer interface {
GetAllAppServices() []*v1.AppService
GetAppServiceStatus(serviceID string) string
GetAppServicesStatus(serviceIDs []string) map[string]string
GetTenantResource(tenantID string) *v1.TenantResource
GetTenantResource(tenantID string) TenantResource
GetTenantResourceList() []TenantResource
GetTenantRunningApp(tenantID string) []*v1.AppService
GetNeedBillingStatus(serviceIDs []string) map[string]string
OnDeletes(obj ...interface{})
@ -125,6 +126,7 @@ type appRuntimeStore struct {
podUpdateListenerLock sync.Mutex
volumeTypeListeners map[string]chan<- *model.TenantServiceVolumeType
volumeTypeListenerLock sync.Mutex
resourceCache *ResourceCache
}
//NewStore new app runtime store
@ -144,6 +146,7 @@ func NewStore(clientset kubernetes.Interface,
conf: conf,
dbmanager: dbmanager,
startCh: startCh,
resourceCache: NewResourceCache(),
podUpdateListeners: make(map[string]chan<- *corev1.Pod, 1),
volumeTypeListeners: make(map[string]chan<- *model.TenantServiceVolumeType, 1),
}
@ -1054,79 +1057,13 @@ func (a *appRuntimeStore) GetPodLister() listcorev1.PodLister {
}
//GetTenantResource get tenant resource
func (a *appRuntimeStore) GetTenantResource(tenantID string) *v1.TenantResource {
nodes, err := a.listers.Nodes.List(labels.Everything())
if err != nil {
logrus.Errorf("error listing nodes: %v", err)
return nil
}
nodeStatus := make(map[string]bool, len(nodes))
for _, node := range nodes {
nodeStatus[node.Name] = node.Spec.Unschedulable
}
pods, err := a.listers.Pod.Pods(tenantID).List(labels.Everything())
if err != nil {
logrus.Errorf("list namespace %s pod failure %s", tenantID, err.Error())
return nil
}
func (a *appRuntimeStore) GetTenantResource(tenantID string) TenantResource {
return a.resourceCache.GetTenantResource(tenantID)
}
calculateResourcesfunc := func(pod *corev1.Pod, res map[string]int64) {
runningC := make(map[string]struct{})
cstatus := append(pod.Status.ContainerStatuses, pod.Status.InitContainerStatuses...)
for _, c := range cstatus {
runningC[c.Name] = struct{}{}
}
for _, container := range pod.Spec.Containers {
if _, ok := runningC[container.Name]; !ok {
continue
}
cpulimit := container.Resources.Limits.Cpu()
memorylimit := container.Resources.Limits.Memory()
cpurequest := container.Resources.Requests.Cpu()
memoryrequest := container.Resources.Requests.Memory()
if cpulimit != nil {
res["cpulimit"] += cpulimit.MilliValue()
}
if memorylimit != nil {
if ml, ok := memorylimit.AsInt64(); ok {
res["memlimit"] += ml
} else {
res["memlimit"] += memorylimit.Value()
}
}
if cpurequest != nil {
res["cpureq"] += cpurequest.MilliValue()
}
if memoryrequest != nil {
if mr, ok := memoryrequest.AsInt64(); ok {
res["memreq"] += mr
} else {
res["memreq"] += memoryrequest.Value()
}
}
}
}
resource := &v1.TenantResource{}
// schedulable resources
sres := make(map[string]int64)
// unschedulable resources
ures := make(map[string]int64)
for _, pod := range pods {
if nodeStatus[pod.Spec.NodeName] {
calculateResourcesfunc(pod, ures)
continue
}
calculateResourcesfunc(pod, sres)
}
resource.CPULimit = sres["cpulimit"]
resource.CPURequest = sres["cpureq"]
resource.MemoryLimit = sres["memlimit"]
resource.MemoryRequest = sres["memreq"]
resource.UnscdCPULimit = ures["cpulimit"]
resource.UnscdCPUReq = ures["cpureq"]
resource.UnscdMemoryLimit = ures["memlimit"]
resource.UnscdMemoryReq = ures["memreq"]
return resource
//GetTenantResource get tenant resource
func (a *appRuntimeStore) GetTenantResourceList() []TenantResource {
return a.resourceCache.GetAllTenantResource()
}
//GetTenantRunningApp get running app by tenant
@ -1145,6 +1082,7 @@ func (a *appRuntimeStore) podEventHandler() cache.ResourceEventHandlerFuncs {
return cache.ResourceEventHandlerFuncs{
AddFunc: func(obj interface{}) {
pod := obj.(*corev1.Pod)
a.resourceCache.SetPodResource(pod)
_, serviceID, version, createrID := k8sutil.ExtractLabels(pod.GetLabels())
if serviceID != "" && version != "" && createrID != "" {
appservice, err := a.getAppService(serviceID, version, createrID, true)
@ -1158,6 +1096,7 @@ func (a *appRuntimeStore) podEventHandler() cache.ResourceEventHandlerFuncs {
},
DeleteFunc: func(obj interface{}) {
pod := obj.(*corev1.Pod)
a.resourceCache.RemovePod(pod)
_, serviceID, version, createrID := k8sutil.ExtractLabels(pod.GetLabels())
if serviceID != "" && version != "" && createrID != "" {
appservice, _ := a.getAppService(serviceID, version, createrID, false)
@ -1171,6 +1110,7 @@ func (a *appRuntimeStore) podEventHandler() cache.ResourceEventHandlerFuncs {
},
UpdateFunc: func(old, cur interface{}) {
pod := cur.(*corev1.Pod)
a.resourceCache.SetPodResource(pod)
_, serviceID, version, createrID := k8sutil.ExtractLabels(pod.GetLabels())
if serviceID != "" && version != "" && createrID != "" {
appservice, err := a.getAppService(serviceID, version, createrID, true)

View File

@ -20,11 +20,13 @@ package client
import (
"context"
"strings"
"time"
"github.com/Sirupsen/logrus"
etcdnaming "github.com/coreos/etcd/clientv3/naming"
"github.com/goodrain/rainbond/db/model"
etcdutil "github.com/goodrain/rainbond/util/etcd"
grpcutil "github.com/goodrain/rainbond/util/grpc"
v1 "github.com/goodrain/rainbond/worker/appm/types/v1"
"github.com/goodrain/rainbond/worker/server/pb"
"google.golang.org/grpc"
@ -60,7 +62,7 @@ func NewClient(ctx context.Context, conf AppRuntimeSyncClientConf) (*AppRuntimeS
KeyFile: conf.EtcdKeyFile,
}
c, err := etcdutil.NewClient(ctx, etcdClientArgs)
r := &etcdnaming.GRPCResolver{Client: c}
r := &grpcutil.GRPCResolver{Client: c}
b := grpc.RoundRobin(r)
arsc.cc, err = grpc.DialContext(ctx, "/rainbond/discover/app_sync_runtime_server", grpc.WithBalancer(b), grpc.WithInsecure(), grpc.WithBlock())
if err != nil {
@ -77,7 +79,7 @@ func (a *AppRuntimeSyncClient) Error(err error) {
//GetStatus get status
func (a *AppRuntimeSyncClient) GetStatus(serviceID string) string {
ctx, cancel := context.WithCancel(context.Background())
ctx, cancel := context.WithTimeout(context.Background(), time.Second*5)
defer cancel()
status, err := a.AppRuntimeSyncClient.GetAppStatus(ctx, &pb.ServicesRequest{
ServiceIds: serviceID,
@ -90,20 +92,25 @@ func (a *AppRuntimeSyncClient) GetStatus(serviceID string) string {
//GetStatuss get multiple app status
func (a *AppRuntimeSyncClient) GetStatuss(serviceIDs string) map[string]string {
ctx, cancel := context.WithCancel(context.Background())
ctx, cancel := context.WithTimeout(context.Background(), time.Second*15)
defer cancel()
status, err := a.AppRuntimeSyncClient.GetAppStatus(ctx, &pb.ServicesRequest{
ServiceIds: serviceIDs,
})
if err != nil {
return nil
logrus.Errorf("get service status failure %s", err.Error())
re := make(map[string]string, len(serviceIDs))
for _, id := range strings.Split(serviceIDs, ",") {
re[id] = v1.UNKNOW
}
return re
}
return status.Status
}
//GetAllStatus get all status
func (a *AppRuntimeSyncClient) GetAllStatus() map[string]string {
ctx, cancel := context.WithCancel(context.Background())
ctx, cancel := context.WithTimeout(context.Background(), time.Second*15)
defer cancel()
status, err := a.AppRuntimeSyncClient.GetAppStatus(ctx, &pb.ServicesRequest{
ServiceIds: "",
@ -116,7 +123,7 @@ func (a *AppRuntimeSyncClient) GetAllStatus() map[string]string {
//GetNeedBillingStatus get need billing status
func (a *AppRuntimeSyncClient) GetNeedBillingStatus() (map[string]string, error) {
ctx, cancel := context.WithCancel(context.Background())
ctx, cancel := context.WithTimeout(context.Background(), time.Second*15)
defer cancel()
re, err := a.AppRuntimeSyncClient.GetAppStatus(ctx, &pb.ServicesRequest{})
if err != nil {
@ -133,7 +140,7 @@ func (a *AppRuntimeSyncClient) GetNeedBillingStatus() (map[string]string, error)
//GetServiceDeployInfo get service deploy info
func (a *AppRuntimeSyncClient) GetServiceDeployInfo(serviceID string) (*pb.DeployInfo, error) {
ctx, cancel := context.WithCancel(context.Background())
ctx, cancel := context.WithTimeout(context.Background(), time.Second*5)
defer cancel()
re, err := a.AppRuntimeSyncClient.GetDeployInfo(ctx, &pb.ServiceRequest{
ServiceId: serviceID,
@ -151,14 +158,21 @@ func (a *AppRuntimeSyncClient) IsClosedStatus(curStatus string) bool {
//GetTenantResource get tenant resource
func (a *AppRuntimeSyncClient) GetTenantResource(tenantID string) (*pb.TenantResource, error) {
ctx, cancel := context.WithCancel(context.Background())
ctx, cancel := context.WithTimeout(context.Background(), time.Second*10)
defer cancel()
return a.AppRuntimeSyncClient.GetTenantResource(ctx, &pb.TenantRequest{TenantId: tenantID})
}
//GetAllTenantResource get all tenant resource
func (a *AppRuntimeSyncClient) GetAllTenantResource() (*pb.TenantResourceList, error) {
ctx, cancel := context.WithTimeout(context.Background(), time.Second*10)
defer cancel()
return a.AppRuntimeSyncClient.GetTenantResources(ctx, &pb.Empty{})
}
// ListThirdPartyEndpoints -
func (a *AppRuntimeSyncClient) ListThirdPartyEndpoints(sid string) (*pb.ThirdPartyEndpoints, error) {
ctx, cancel := context.WithCancel(context.Background())
ctx, cancel := context.WithTimeout(context.Background(), time.Second*10)
defer cancel()
resp, err := a.AppRuntimeSyncClient.ListThirdPartyEndpoints(ctx, &pb.ServiceRequest{
ServiceId: sid,
@ -171,7 +185,7 @@ func (a *AppRuntimeSyncClient) ListThirdPartyEndpoints(sid string) (*pb.ThirdPar
// AddThirdPartyEndpoint -
func (a *AppRuntimeSyncClient) AddThirdPartyEndpoint(req *model.Endpoint) {
ctx, cancel := context.WithCancel(context.Background())
ctx, cancel := context.WithTimeout(context.Background(), time.Second*10)
defer cancel()
_, _ = a.AppRuntimeSyncClient.AddThirdPartyEndpoint(ctx, &pb.AddThirdPartyEndpointsReq{
Uuid: req.UUID,
@ -184,7 +198,7 @@ func (a *AppRuntimeSyncClient) AddThirdPartyEndpoint(req *model.Endpoint) {
// UpdThirdPartyEndpoint -
func (a *AppRuntimeSyncClient) UpdThirdPartyEndpoint(req *model.Endpoint) {
ctx, cancel := context.WithCancel(context.Background())
ctx, cancel := context.WithTimeout(context.Background(), time.Second*10)
defer cancel()
_, _ = a.AppRuntimeSyncClient.UpdThirdPartyEndpoint(ctx, &pb.UpdThirdPartyEndpointsReq{
Uuid: req.UUID,
@ -197,7 +211,7 @@ func (a *AppRuntimeSyncClient) UpdThirdPartyEndpoint(req *model.Endpoint) {
// DelThirdPartyEndpoint -
func (a *AppRuntimeSyncClient) DelThirdPartyEndpoint(req *model.Endpoint) {
ctx, cancel := context.WithCancel(context.Background())
ctx, cancel := context.WithTimeout(context.Background(), time.Second*10)
defer cancel()
_, _ = a.AppRuntimeSyncClient.DelThirdPartyEndpoint(ctx, &pb.DelThirdPartyEndpointsReq{
Uuid: req.UUID,
@ -209,14 +223,14 @@ func (a *AppRuntimeSyncClient) DelThirdPartyEndpoint(req *model.Endpoint) {
// GetStorageClasses client GetStorageClasses
func (a *AppRuntimeSyncClient) GetStorageClasses() (storageclasses *pb.StorageClasses, err error) {
ctx, cancel := context.WithCancel(context.Background())
ctx, cancel := context.WithTimeout(context.Background(), time.Second*10)
defer cancel()
return a.AppRuntimeSyncClient.GetStorageClasses(ctx, &pb.Empty{})
}
// GetAppVolumeStatus get app volume status
func (a *AppRuntimeSyncClient) GetAppVolumeStatus(serviceID string) (*pb.ServiceVolumeStatusMessage, error) {
ctx, cancel := context.WithCancel(context.Background())
ctx, cancel := context.WithTimeout(context.Background(), time.Second*10)
defer cancel()
return a.AppRuntimeSyncClient.GetAppVolumeStatus(ctx, &pb.ServiceRequest{ServiceId: serviceID})
}

View File

@ -43,16 +43,20 @@ import (
//Controller app runtime master controller
type Controller struct {
ctx context.Context
cancel context.CancelFunc
conf option.Config
store store.Storer
dbmanager db.Manager
memoryUse *prometheus.GaugeVec
fsUse *prometheus.GaugeVec
diskCache *statistical.DiskCache
pc *controller.ProvisionController
isLeader bool
ctx context.Context
cancel context.CancelFunc
conf option.Config
store store.Storer
dbmanager db.Manager
memoryUse *prometheus.GaugeVec
fsUse *prometheus.GaugeVec
diskCache *statistical.DiskCache
namespaceMemRequest *prometheus.GaugeVec
namespaceMemLimit *prometheus.GaugeVec
namespaceCPURequest *prometheus.GaugeVec
namespaceCPULimit *prometheus.GaugeVec
pc *controller.ProvisionController
isLeader bool
stopCh chan struct{}
podEventChs []chan *corev1.Pod
@ -104,6 +108,26 @@ func NewMasterController(conf option.Config, store store.Storer) (*Controller, e
Name: "appfs",
Help: "tenant service fs used.",
}, []string{"tenant_id", "service_id", "volume_type"}),
namespaceMemRequest: prometheus.NewGaugeVec(prometheus.GaugeOpts{
Namespace: "namespace_resource",
Name: "memory_request",
Help: "total memory request in namespace",
}, []string{"namespace"}),
namespaceMemLimit: prometheus.NewGaugeVec(prometheus.GaugeOpts{
Namespace: "namespace_resource",
Name: "memory_limit",
Help: "total memory limit in namespace",
}, []string{"namespace"}),
namespaceCPURequest: prometheus.NewGaugeVec(prometheus.GaugeOpts{
Namespace: "namespace_resource",
Name: "cpu_request",
Help: "total cpu request in namespace",
}, []string{"namespace"}),
namespaceCPULimit: prometheus.NewGaugeVec(prometheus.GaugeOpts{
Namespace: "namespace_resource",
Name: "cpu_limit",
Help: "total cpu limit in namespace",
}, []string{"namespace"}),
diskCache: statistical.CreatDiskCache(ctx),
podEvent: podevent.New(conf.KubeClient, stopCh),
volumeTypeEvent: sync.New(stopCh),
@ -185,7 +209,18 @@ func (m *Controller) Scrape(ch chan<- prometheus.Metric, scrapeDurationDesc *pro
}
}
ch <- prometheus.MustNewConstMetric(scrapeDurationDesc, prometheus.GaugeValue, time.Since(scrapeTime).Seconds(), "collect.fs")
resources := m.store.GetTenantResourceList()
for _, re := range resources {
m.namespaceMemLimit.WithLabelValues(re.Namespace).Set(float64(re.MemoryLimit / 1024 / 1024))
m.namespaceCPULimit.WithLabelValues(re.Namespace).Set(float64(re.CPULimit))
m.namespaceMemRequest.WithLabelValues(re.Namespace).Set(float64(re.MemoryRequest / 1024 / 1024))
m.namespaceCPURequest.WithLabelValues(re.Namespace).Set(float64(re.CPURequest))
}
m.fsUse.Collect(ch)
m.memoryUse.Collect(ch)
logrus.Infof("success collect app disk and memory used metric")
m.namespaceMemLimit.Collect(ch)
m.namespaceCPULimit.Collect(ch)
m.namespaceMemRequest.Collect(ch)
m.namespaceCPURequest.Collect(ch)
logrus.Infof("success collect worker master metric")
}

View File

@ -33,8 +33,6 @@ type Exporter struct {
error prometheus.Gauge
totalScrapes prometheus.Counter
scrapeErrors *prometheus.CounterVec
memoryUse *prometheus.GaugeVec
fsUse *prometheus.GaugeVec
workerUp prometheus.Gauge
dbmanager db.Manager
masterController *master.Controller

View File

@ -107,7 +107,7 @@ func (x PodStatus_Type) String() string {
}
func (PodStatus_Type) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_f94cf1a886c479d6, []int{19, 0}
return fileDescriptor_f94cf1a886c479d6, []int{20, 0}
}
type Empty struct {
@ -650,10 +650,6 @@ type TenantResource struct {
MemoryRequest int64 `protobuf:"varint,3,opt,name=memory_request,json=memoryRequest,proto3" json:"memory_request,omitempty"`
MemoryLimit int64 `protobuf:"varint,4,opt,name=memory_limit,json=memoryLimit,proto3" json:"memory_limit,omitempty"`
RunningAppNum int64 `protobuf:"varint,5,opt,name=running_app_num,json=runningAppNum,proto3" json:"running_app_num,omitempty"`
UnscdCpuReq int64 `protobuf:"varint,6,opt,name=unscd_cpu_req,json=unscdCpuReq,proto3" json:"unscd_cpu_req,omitempty"`
UnscdCpuLimit int64 `protobuf:"varint,7,opt,name=unscd_cpu_limit,json=unscdCpuLimit,proto3" json:"unscd_cpu_limit,omitempty"`
UnscdMemoryReq int64 `protobuf:"varint,8,opt,name=unscd_memory_req,json=unscdMemoryReq,proto3" json:"unscd_memory_req,omitempty"`
UnscdMemoryLimit int64 `protobuf:"varint,9,opt,name=unscd_memory_limit,json=unscdMemoryLimit,proto3" json:"unscd_memory_limit,omitempty"`
RunningAppThirdNum int64 `protobuf:"varint,10,opt,name=running_app_third_num,json=runningAppThirdNum,proto3" json:"running_app_third_num,omitempty"`
RunningAppInternalNum int64 `protobuf:"varint,11,opt,name=running_app_internal_num,json=runningAppInternalNum,proto3" json:"running_app_internal_num,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
@ -721,34 +717,6 @@ func (m *TenantResource) GetRunningAppNum() int64 {
return 0
}
func (m *TenantResource) GetUnscdCpuReq() int64 {
if m != nil {
return m.UnscdCpuReq
}
return 0
}
func (m *TenantResource) GetUnscdCpuLimit() int64 {
if m != nil {
return m.UnscdCpuLimit
}
return 0
}
func (m *TenantResource) GetUnscdMemoryReq() int64 {
if m != nil {
return m.UnscdMemoryReq
}
return 0
}
func (m *TenantResource) GetUnscdMemoryLimit() int64 {
if m != nil {
return m.UnscdMemoryLimit
}
return 0
}
func (m *TenantResource) GetRunningAppThirdNum() int64 {
if m != nil {
return m.RunningAppThirdNum
@ -763,6 +731,45 @@ func (m *TenantResource) GetRunningAppInternalNum() int64 {
return 0
}
type TenantResourceList struct {
Resources map[string]*TenantResource `protobuf:"bytes,1,rep,name=resources,proto3" json:"resources,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *TenantResourceList) Reset() { *m = TenantResourceList{} }
func (m *TenantResourceList) String() string { return proto.CompactTextString(m) }
func (*TenantResourceList) ProtoMessage() {}
func (*TenantResourceList) Descriptor() ([]byte, []int) {
return fileDescriptor_f94cf1a886c479d6, []int{11}
}
func (m *TenantResourceList) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_TenantResourceList.Unmarshal(m, b)
}
func (m *TenantResourceList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_TenantResourceList.Marshal(b, m, deterministic)
}
func (m *TenantResourceList) XXX_Merge(src proto.Message) {
xxx_messageInfo_TenantResourceList.Merge(m, src)
}
func (m *TenantResourceList) XXX_Size() int {
return xxx_messageInfo_TenantResourceList.Size(m)
}
func (m *TenantResourceList) XXX_DiscardUnknown() {
xxx_messageInfo_TenantResourceList.DiscardUnknown(m)
}
var xxx_messageInfo_TenantResourceList proto.InternalMessageInfo
func (m *TenantResourceList) GetResources() map[string]*TenantResource {
if m != nil {
return m.Resources
}
return nil
}
type AddThirdPartyEndpointsReq struct {
Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"`
Sid string `protobuf:"bytes,2,opt,name=sid,proto3" json:"sid,omitempty"`
@ -778,7 +785,7 @@ func (m *AddThirdPartyEndpointsReq) Reset() { *m = AddThirdPartyEndpoint
func (m *AddThirdPartyEndpointsReq) String() string { return proto.CompactTextString(m) }
func (*AddThirdPartyEndpointsReq) ProtoMessage() {}
func (*AddThirdPartyEndpointsReq) Descriptor() ([]byte, []int) {
return fileDescriptor_f94cf1a886c479d6, []int{11}
return fileDescriptor_f94cf1a886c479d6, []int{12}
}
func (m *AddThirdPartyEndpointsReq) XXX_Unmarshal(b []byte) error {
@ -849,7 +856,7 @@ func (m *UpdThirdPartyEndpointsReq) Reset() { *m = UpdThirdPartyEndpoint
func (m *UpdThirdPartyEndpointsReq) String() string { return proto.CompactTextString(m) }
func (*UpdThirdPartyEndpointsReq) ProtoMessage() {}
func (*UpdThirdPartyEndpointsReq) Descriptor() ([]byte, []int) {
return fileDescriptor_f94cf1a886c479d6, []int{12}
return fileDescriptor_f94cf1a886c479d6, []int{13}
}
func (m *UpdThirdPartyEndpointsReq) XXX_Unmarshal(b []byte) error {
@ -919,7 +926,7 @@ func (m *DelThirdPartyEndpointsReq) Reset() { *m = DelThirdPartyEndpoint
func (m *DelThirdPartyEndpointsReq) String() string { return proto.CompactTextString(m) }
func (*DelThirdPartyEndpointsReq) ProtoMessage() {}
func (*DelThirdPartyEndpointsReq) Descriptor() ([]byte, []int) {
return fileDescriptor_f94cf1a886c479d6, []int{13}
return fileDescriptor_f94cf1a886c479d6, []int{14}
}
func (m *DelThirdPartyEndpointsReq) XXX_Unmarshal(b []byte) error {
@ -984,7 +991,7 @@ func (m *ThirdPartyEndpoint) Reset() { *m = ThirdPartyEndpoint{} }
func (m *ThirdPartyEndpoint) String() string { return proto.CompactTextString(m) }
func (*ThirdPartyEndpoint) ProtoMessage() {}
func (*ThirdPartyEndpoint) Descriptor() ([]byte, []int) {
return fileDescriptor_f94cf1a886c479d6, []int{14}
return fileDescriptor_f94cf1a886c479d6, []int{15}
}
func (m *ThirdPartyEndpoint) XXX_Unmarshal(b []byte) error {
@ -1058,7 +1065,7 @@ func (m *ThirdPartyEndpoints) Reset() { *m = ThirdPartyEndpoints{} }
func (m *ThirdPartyEndpoints) String() string { return proto.CompactTextString(m) }
func (*ThirdPartyEndpoints) ProtoMessage() {}
func (*ThirdPartyEndpoints) Descriptor() ([]byte, []int) {
return fileDescriptor_f94cf1a886c479d6, []int{15}
return fileDescriptor_f94cf1a886c479d6, []int{16}
}
func (m *ThirdPartyEndpoints) XXX_Unmarshal(b []byte) error {
@ -1097,7 +1104,7 @@ func (m *ListPodsBySIDReq) Reset() { *m = ListPodsBySIDReq{} }
func (m *ListPodsBySIDReq) String() string { return proto.CompactTextString(m) }
func (*ListPodsBySIDReq) ProtoMessage() {}
func (*ListPodsBySIDReq) Descriptor() ([]byte, []int) {
return fileDescriptor_f94cf1a886c479d6, []int{16}
return fileDescriptor_f94cf1a886c479d6, []int{17}
}
func (m *ListPodsBySIDReq) XXX_Unmarshal(b []byte) error {
@ -1137,7 +1144,7 @@ func (m *GetPodDetailReq) Reset() { *m = GetPodDetailReq{} }
func (m *GetPodDetailReq) String() string { return proto.CompactTextString(m) }
func (*GetPodDetailReq) ProtoMessage() {}
func (*GetPodDetailReq) Descriptor() ([]byte, []int) {
return fileDescriptor_f94cf1a886c479d6, []int{17}
return fileDescriptor_f94cf1a886c479d6, []int{18}
}
func (m *GetPodDetailReq) XXX_Unmarshal(b []byte) error {
@ -1186,7 +1193,7 @@ func (m *PodEvent) Reset() { *m = PodEvent{} }
func (m *PodEvent) String() string { return proto.CompactTextString(m) }
func (*PodEvent) ProtoMessage() {}
func (*PodEvent) Descriptor() ([]byte, []int) {
return fileDescriptor_f94cf1a886c479d6, []int{18}
return fileDescriptor_f94cf1a886c479d6, []int{19}
}
func (m *PodEvent) XXX_Unmarshal(b []byte) error {
@ -1250,7 +1257,7 @@ func (m *PodStatus) Reset() { *m = PodStatus{} }
func (m *PodStatus) String() string { return proto.CompactTextString(m) }
func (*PodStatus) ProtoMessage() {}
func (*PodStatus) Descriptor() ([]byte, []int) {
return fileDescriptor_f94cf1a886c479d6, []int{19}
return fileDescriptor_f94cf1a886c479d6, []int{20}
}
func (m *PodStatus) XXX_Unmarshal(b []byte) error {
@ -1324,7 +1331,7 @@ func (m *PodContainer) Reset() { *m = PodContainer{} }
func (m *PodContainer) String() string { return proto.CompactTextString(m) }
func (*PodContainer) ProtoMessage() {}
func (*PodContainer) Descriptor() ([]byte, []int) {
return fileDescriptor_f94cf1a886c479d6, []int{20}
return fileDescriptor_f94cf1a886c479d6, []int{21}
}
func (m *PodContainer) XXX_Unmarshal(b []byte) error {
@ -1421,7 +1428,7 @@ func (m *PodDetail) Reset() { *m = PodDetail{} }
func (m *PodDetail) String() string { return proto.CompactTextString(m) }
func (*PodDetail) ProtoMessage() {}
func (*PodDetail) Descriptor() ([]byte, []int) {
return fileDescriptor_f94cf1a886c479d6, []int{21}
return fileDescriptor_f94cf1a886c479d6, []int{22}
}
func (m *PodDetail) XXX_Unmarshal(b []byte) error {
@ -1523,7 +1530,7 @@ func (m *StorageClasses) Reset() { *m = StorageClasses{} }
func (m *StorageClasses) String() string { return proto.CompactTextString(m) }
func (*StorageClasses) ProtoMessage() {}
func (*StorageClasses) Descriptor() ([]byte, []int) {
return fileDescriptor_f94cf1a886c479d6, []int{22}
return fileDescriptor_f94cf1a886c479d6, []int{23}
}
func (m *StorageClasses) XXX_Unmarshal(b []byte) error {
@ -1568,7 +1575,7 @@ func (m *StorageClassDetail) Reset() { *m = StorageClassDetail{} }
func (m *StorageClassDetail) String() string { return proto.CompactTextString(m) }
func (*StorageClassDetail) ProtoMessage() {}
func (*StorageClassDetail) Descriptor() ([]byte, []int) {
return fileDescriptor_f94cf1a886c479d6, []int{23}
return fileDescriptor_f94cf1a886c479d6, []int{24}
}
func (m *StorageClassDetail) XXX_Unmarshal(b []byte) error {
@ -1649,7 +1656,7 @@ func (m *TopologySelectorTerm) Reset() { *m = TopologySelectorTerm{} }
func (m *TopologySelectorTerm) String() string { return proto.CompactTextString(m) }
func (*TopologySelectorTerm) ProtoMessage() {}
func (*TopologySelectorTerm) Descriptor() ([]byte, []int) {
return fileDescriptor_f94cf1a886c479d6, []int{24}
return fileDescriptor_f94cf1a886c479d6, []int{25}
}
func (m *TopologySelectorTerm) XXX_Unmarshal(b []byte) error {
@ -1689,7 +1696,7 @@ func (m *TopologySelectorLabelRequirement) Reset() { *m = TopologySelect
func (m *TopologySelectorLabelRequirement) String() string { return proto.CompactTextString(m) }
func (*TopologySelectorLabelRequirement) ProtoMessage() {}
func (*TopologySelectorLabelRequirement) Descriptor() ([]byte, []int) {
return fileDescriptor_f94cf1a886c479d6, []int{25}
return fileDescriptor_f94cf1a886c479d6, []int{26}
}
func (m *TopologySelectorLabelRequirement) XXX_Unmarshal(b []byte) error {
@ -1735,7 +1742,7 @@ func (m *ServiceVolumeStatusMessage) Reset() { *m = ServiceVolumeStatusM
func (m *ServiceVolumeStatusMessage) String() string { return proto.CompactTextString(m) }
func (*ServiceVolumeStatusMessage) ProtoMessage() {}
func (*ServiceVolumeStatusMessage) Descriptor() ([]byte, []int) {
return fileDescriptor_f94cf1a886c479d6, []int{26}
return fileDescriptor_f94cf1a886c479d6, []int{27}
}
func (m *ServiceVolumeStatusMessage) XXX_Unmarshal(b []byte) error {
@ -1786,6 +1793,8 @@ func init() {
proto.RegisterMapType((map[string]string)(nil), "pb.DeployInfo.SecretsEntry")
proto.RegisterMapType((map[string]string)(nil), "pb.DeployInfo.ServicesEntry")
proto.RegisterType((*TenantResource)(nil), "pb.TenantResource")
proto.RegisterType((*TenantResourceList)(nil), "pb.TenantResourceList")
proto.RegisterMapType((map[string]*TenantResource)(nil), "pb.TenantResourceList.ResourcesEntry")
proto.RegisterType((*AddThirdPartyEndpointsReq)(nil), "pb.AddThirdPartyEndpointsReq")
proto.RegisterType((*UpdThirdPartyEndpointsReq)(nil), "pb.UpdThirdPartyEndpointsReq")
proto.RegisterType((*DelThirdPartyEndpointsReq)(nil), "pb.DelThirdPartyEndpointsReq")
@ -1809,135 +1818,135 @@ func init() {
func init() { proto.RegisterFile("app_runtime_server.proto", fileDescriptor_f94cf1a886c479d6) }
var fileDescriptor_f94cf1a886c479d6 = []byte{
// 2037 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x58, 0x5d, 0x72, 0x1b, 0xc7,
0x11, 0x26, 0x00, 0xe2, 0xaf, 0x41, 0x80, 0xe0, 0x48, 0x14, 0x21, 0xd8, 0xb2, 0xe8, 0x8d, 0xac,
0x52, 0x29, 0x0a, 0xed, 0x30, 0x56, 0x59, 0xb2, 0x15, 0xa7, 0x20, 0x02, 0xa6, 0x90, 0x80, 0x20,
0x6b, 0x01, 0x26, 0xe5, 0xaa, 0x54, 0xa1, 0x96, 0xd8, 0x31, 0xbd, 0xd1, 0xfe, 0x4c, 0xf6, 0x87,
0x0e, 0x1e, 0x93, 0x2b, 0xe4, 0x08, 0x79, 0xc8, 0x05, 0xf2, 0x9c, 0x0b, 0xe4, 0x21, 0xb9, 0x89,
0x5e, 0x72, 0x80, 0x54, 0xf7, 0xcc, 0xfe, 0x00, 0x58, 0x86, 0x61, 0x2a, 0x29, 0xbf, 0xed, 0x74,
0x7f, 0xfd, 0x33, 0xdd, 0xbd, 0x3d, 0x3d, 0x03, 0x1d, 0x43, 0x88, 0x99, 0x1f, 0xb9, 0xa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, 0x07, 0xea, 0x35, 0x25, 0xb9, 0x63, 0x2f, 0x53, 0xf7, 0x7b,
0xfb, 0x3f, 0x51, 0xf2, 0x29, 0x95, 0x40, 0x7a, 0xfa, 0x51, 0x09, 0xac, 0x4c, 0x7a, 0xdd, 0xf8,
0xec, 0x92, 0x14, 0x92, 0xc2, 0x64, 0xac, 0xb4, 0xf8, 0x54, 0xaf, 0x4c, 0xc2, 0x32, 0x5b, 0xdb,
0x60, 0x3f, 0x07, 0x26, 0x8b, 0x66, 0xa9, 0x62, 0xf3, 0xe2, 0xff, 0xc1, 0xbf, 0xff, 0xc9, 0xb4,
0x8d, 0x8b, 0x0a, 0x3d, 0x10, 0xff, 0xe4, 0x5f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x27, 0xef, 0xee,
0x1b, 0x3c, 0x16, 0x00, 0x00,
// 2035 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x58, 0xcd, 0x72, 0x23, 0xb7,
0x11, 0x16, 0x49, 0xf1, 0xaf, 0x29, 0x52, 0x14, 0x76, 0x25, 0x71, 0x69, 0xaf, 0x57, 0x9e, 0xec,
0x6e, 0x6d, 0x6d, 0x1c, 0xda, 0x51, 0xbc, 0xe5, 0x5d, 0x7b, 0xe3, 0x14, 0x97, 0xa4, 0x25, 0x26,
0x14, 0xc5, 0x1a, 0x52, 0x49, 0xb9, 0x2a, 0x55, 0xac, 0x11, 0x07, 0x96, 0x27, 0x3b, 0x3f, 0xf0,
0x0c, 0x46, 0x0e, 0x8f, 0xc9, 0x21, 0x2f, 0x90, 0x47, 0xc8, 0x21, 0x87, 0xe4, 0x98, 0x73, 0x5e,
0x21, 0x8f, 0xe2, 0x4b, 0x1e, 0x20, 0xd5, 0x00, 0xe6, 0x87, 0xe4, 0x28, 0x8a, 0x52, 0x49, 0xf9,
0x06, 0x34, 0xfa, 0x43, 0x03, 0xdd, 0x8d, 0xc6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3b, 0x59, 0xa6, 0x9c, 0x24, 0x93, 0x70,
0xcb, 0x49, 0x6e, 0xe4, 0xe2, 0x1b, 0x93, 0x64, 0x32, 0x66, 0xa2, 0x3e, 0x09, 0xec, 0xff, 0x64,
0x92, 0x8f, 0x45, 0xf6, 0x24, 0x17, 0xa7, 0xc8, 0x9e, 0x35, 0x92, 0xd8, 0x8e, 0xae, 0x3d, 0x29,
0x11, 0x28, 0x8c, 0xe3, 0xda, 0xed, 0x90, 0x0a, 0x04, 0x59, 0xaf, 0xcd, 0x14, 0x5d, 0xf7, 0x73,
0x11, 0xbf, 0x2e, 0x63, 0x2b, 0xc9, 0x9e, 0xe5, 0xff, 0xf7, 0xfe, 0xfd, 0xf9, 0xd4, 0xb6, 0x2e,
0x4b, 0xe2, 0x97, 0xf9, 0x27, 0xff, 0x0a, 0x00, 0x00, 0xff, 0xff, 0xb2, 0x1c, 0x00, 0xcc, 0x81,
0x16, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
@ -1956,6 +1965,7 @@ type AppRuntimeSyncClient interface {
GetAppPods(ctx context.Context, in *ServiceRequest, opts ...grpc.CallOption) (*ServiceAppPodList, error)
GetDeployInfo(ctx context.Context, in *ServiceRequest, opts ...grpc.CallOption) (*DeployInfo, error)
GetTenantResource(ctx context.Context, in *TenantRequest, opts ...grpc.CallOption) (*TenantResource, error)
GetTenantResources(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*TenantResourceList, error)
ListThirdPartyEndpoints(ctx context.Context, in *ServiceRequest, opts ...grpc.CallOption) (*ThirdPartyEndpoints, error)
AddThirdPartyEndpoint(ctx context.Context, in *AddThirdPartyEndpointsReq, opts ...grpc.CallOption) (*Empty, error)
UpdThirdPartyEndpoint(ctx context.Context, in *UpdThirdPartyEndpointsReq, opts ...grpc.CallOption) (*Empty, error)
@ -2009,6 +2019,15 @@ func (c *appRuntimeSyncClient) GetTenantResource(ctx context.Context, in *Tenant
return out, nil
}
func (c *appRuntimeSyncClient) GetTenantResources(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*TenantResourceList, error) {
out := new(TenantResourceList)
err := c.cc.Invoke(ctx, "/pb.AppRuntimeSync/GetTenantResources", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *appRuntimeSyncClient) ListThirdPartyEndpoints(ctx context.Context, in *ServiceRequest, opts ...grpc.CallOption) (*ThirdPartyEndpoints, error) {
out := new(ThirdPartyEndpoints)
err := c.cc.Invoke(ctx, "/pb.AppRuntimeSync/ListThirdPartyEndpoints", in, out, opts...)
@ -2078,6 +2097,7 @@ type AppRuntimeSyncServer interface {
GetAppPods(context.Context, *ServiceRequest) (*ServiceAppPodList, error)
GetDeployInfo(context.Context, *ServiceRequest) (*DeployInfo, error)
GetTenantResource(context.Context, *TenantRequest) (*TenantResource, error)
GetTenantResources(context.Context, *Empty) (*TenantResourceList, error)
ListThirdPartyEndpoints(context.Context, *ServiceRequest) (*ThirdPartyEndpoints, error)
AddThirdPartyEndpoint(context.Context, *AddThirdPartyEndpointsReq) (*Empty, error)
UpdThirdPartyEndpoint(context.Context, *UpdThirdPartyEndpointsReq) (*Empty, error)
@ -2163,6 +2183,24 @@ func _AppRuntimeSync_GetTenantResource_Handler(srv interface{}, ctx context.Cont
return interceptor(ctx, in, info, handler)
}
func _AppRuntimeSync_GetTenantResources_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(Empty)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(AppRuntimeSyncServer).GetTenantResources(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pb.AppRuntimeSync/GetTenantResources",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AppRuntimeSyncServer).GetTenantResources(ctx, req.(*Empty))
}
return interceptor(ctx, in, info, handler)
}
func _AppRuntimeSync_ListThirdPartyEndpoints_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ServiceRequest)
if err := dec(in); err != nil {
@ -2309,6 +2347,10 @@ var _AppRuntimeSync_serviceDesc = grpc.ServiceDesc{
MethodName: "GetTenantResource",
Handler: _AppRuntimeSync_GetTenantResource_Handler,
},
{
MethodName: "GetTenantResources",
Handler: _AppRuntimeSync_GetTenantResources_Handler,
},
{
MethodName: "ListThirdPartyEndpoints",
Handler: _AppRuntimeSync_ListThirdPartyEndpoints_Handler,

View File

@ -6,6 +6,7 @@ service AppRuntimeSync {
rpc GetAppPods (ServiceRequest) returns (ServiceAppPodList) {}
rpc GetDeployInfo (ServiceRequest) returns (DeployInfo) {}
rpc GetTenantResource (TenantRequest) returns (TenantResource) {}
rpc GetTenantResources (Empty) returns (TenantResourceList) {}
rpc ListThirdPartyEndpoints (ServiceRequest) returns (ThirdPartyEndpoints) {}
rpc AddThirdPartyEndpoint (AddThirdPartyEndpointsReq) returns (Empty) {}
rpc UpdThirdPartyEndpoint (UpdThirdPartyEndpointsReq) returns (Empty) {}
@ -76,14 +77,14 @@ message TenantResource {
int64 memory_request = 3;
int64 memory_limit = 4;
int64 running_app_num = 5;
int64 unscd_cpu_req = 6;
int64 unscd_cpu_limit = 7;
int64 unscd_memory_req = 8;
int64 unscd_memory_limit = 9;
int64 running_app_third_num = 10;
int64 running_app_internal_num = 11;
}
message TenantResourceList {
map<string, TenantResource> resources = 1;
}
message AddThirdPartyEndpointsReq {
string uuid = 1;
string sid = 2;

View File

@ -116,11 +116,6 @@ func (r *RuntimeServer) GetAppStatus(ctx context.Context, re *pb.ServicesRequest
func (r *RuntimeServer) GetTenantResource(ctx context.Context, re *pb.TenantRequest) (*pb.TenantResource, error) {
var tr pb.TenantResource
res := r.store.GetTenantResource(re.TenantId)
if res == nil {
return &tr, nil
}
// tr.RunningAppNum = int64(len(r.store.GetTenantRunningApp(re.TenantId)))
// tr.RunningAppNum = int64(len(r.store.GetTenantRunningApp(re.TenantId)))
runningApps := r.store.GetTenantRunningApp(re.TenantId)
for _, app := range runningApps {
if app.ServiceKind == model.ServiceKindThirdParty {
@ -134,13 +129,33 @@ func (r *RuntimeServer) GetTenantResource(ctx context.Context, re *pb.TenantRequ
tr.CpuRequest = res.CPURequest
tr.MemoryLimit = res.MemoryLimit / 1024 / 1024
tr.MemoryRequest = res.MemoryRequest / 1024 / 1024
tr.UnscdCpuLimit = res.UnscdCPULimit
tr.UnscdCpuReq = res.UnscdCPUReq
tr.UnscdMemoryLimit = res.UnscdMemoryLimit / 1024 / 1024
tr.UnscdMemoryReq = res.UnscdMemoryReq / 1024 / 1024
return &tr, nil
}
//GetTenantResources get tenant resources
func (r *RuntimeServer) GetTenantResources(context.Context, *pb.Empty) (*pb.TenantResourceList, error) {
res := r.store.GetTenantResourceList()
var trs = make(map[string]*pb.TenantResource)
for _, re := range res {
var tr pb.TenantResource
runningApps := r.store.GetTenantRunningApp(re.Namespace)
for _, app := range runningApps {
if app.ServiceKind == model.ServiceKindThirdParty {
tr.RunningAppThirdNum++
} else if app.ServiceKind == model.ServiceKindInternal {
tr.RunningAppInternalNum++
}
}
tr.RunningAppNum = int64(len(runningApps))
tr.CpuLimit = re.CPULimit
tr.CpuRequest = re.CPURequest
tr.MemoryLimit = re.MemoryLimit / 1024 / 1024
tr.MemoryRequest = re.MemoryRequest / 1024 / 1024
trs[re.Namespace] = &tr
}
return &pb.TenantResourceList{Resources: trs}, nil
}
//GetAppPods get app pod list
func (r *RuntimeServer) GetAppPods(ctx context.Context, re *pb.ServiceRequest) (*pb.ServiceAppPodList, error) {
app := r.store.GetAppService(re.ServiceId)