From 9ef6a610ef1317bea7368aa3025ef7a70313ac0e Mon Sep 17 00:00:00 2001 From: yanafu Date: Fri, 24 May 2024 10:39:04 +0800 Subject: [PATCH 1/2] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96k8s=E8=8E=B7?= =?UTF-8?q?=E5=8F=96podList=E4=BF=A1=E6=81=AF=20#229?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../booster/server/pkg/resource/crm/operator/k8s/operator.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/booster/server/pkg/resource/crm/operator/k8s/operator.go b/src/backend/booster/server/pkg/resource/crm/operator/k8s/operator.go index c01447e0..a022e616 100644 --- a/src/backend/booster/server/pkg/resource/crm/operator/k8s/operator.go +++ b/src/backend/booster/server/pkg/resource/crm/operator/k8s/operator.go @@ -542,7 +542,7 @@ func (o *operator) getPods(clusterID, namespace, name string, info *op.ServiceIn blog.Warnf("k8s-operator: found pods of %s num(%d) in status %s", name, len(podList.Items), info.Status) } // if taskgroup are not all built, just means that the application is staging yet. - if (info.RequestInstances < len(podList.Items)) && info.Status != op.ServiceStatusStaging { + if (info.RequestInstances > len(podList.Items)) && info.Status != op.ServiceStatusStaging { blog.Warnf("k8s-operator: found RequestInstances(%d) less than pods num(%d) of %s in status %s", info.RequestInstances, len(podList.Items), name, info.Status) info.Status = op.ServiceStatusStaging } From ce0ea54d40a11ac6f66b88d077cea9822edd1567 Mon Sep 17 00:00:00 2001 From: yanafu Date: Fri, 24 May 2024 10:55:23 +0800 Subject: [PATCH 2/2] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96k8s=E8=8E=B7?= =?UTF-8?q?=E5=8F=96podList=E4=BF=A1=E6=81=AF=20#229?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../booster/server/pkg/resource/crm/operator/k8s/operator.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/backend/booster/server/pkg/resource/crm/operator/k8s/operator.go b/src/backend/booster/server/pkg/resource/crm/operator/k8s/operator.go index a022e616..9110c0f1 100644 --- a/src/backend/booster/server/pkg/resource/crm/operator/k8s/operator.go +++ b/src/backend/booster/server/pkg/resource/crm/operator/k8s/operator.go @@ -538,12 +538,9 @@ func (o *operator) getPods(clusterID, namespace, name string, info *op.ServiceIn Ports: ports, }) } - if len(podList.Items) == 0 && info.Status != op.ServiceStatusStaging { - blog.Warnf("k8s-operator: found pods of %s num(%d) in status %s", name, len(podList.Items), info.Status) - } // if taskgroup are not all built, just means that the application is staging yet. if (info.RequestInstances > len(podList.Items)) && info.Status != op.ServiceStatusStaging { - blog.Warnf("k8s-operator: found RequestInstances(%d) less than pods num(%d) of %s in status %s", info.RequestInstances, len(podList.Items), name, info.Status) + blog.Warnf("k8s-operator: found RequestInstances(%d) greater than pods num(%d) of %s in status %s", info.RequestInstances, len(podList.Items), name, info.Status) info.Status = op.ServiceStatusStaging }