mirror of
https://gitee.com/rainbond/Rainbond.git
synced 2024-12-03 20:27:46 +08:00
[ADD] add debug messages
This commit is contained in:
parent
d714203fb6
commit
a678b632d5
@ -20,6 +20,7 @@ package conversion
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/Sirupsen/logrus"
|
||||
"strings"
|
||||
|
||||
"github.com/goodrain/rainbond/db"
|
||||
@ -79,6 +80,7 @@ func int32Ptr(i int) *int32 {
|
||||
|
||||
//TenantServiceBase conv tenant service base info
|
||||
func TenantServiceBase(as *v1.AppService, dbmanager db.Manager) error {
|
||||
logrus.Debugf("service_id: %d", as.ServiceID)
|
||||
tenantService, err := dbmanager.TenantServiceDao().GetServiceByID(as.ServiceID)
|
||||
if err != nil {
|
||||
if err == gorm.ErrRecordNotFound {
|
||||
@ -114,11 +116,14 @@ func TenantServiceBase(as *v1.AppService, dbmanager db.Manager) error {
|
||||
if err := initTenant(as, tenant); err != nil {
|
||||
return fmt.Errorf("conversion tenant info failure %s", err.Error())
|
||||
}
|
||||
logrus.Debugf("serviceType.LabelValue: %s", serviceType.LabelValue)
|
||||
if serviceType == nil || serviceType.LabelValue == util.StatelessServiceType {
|
||||
logrus.Debugf("Deployment")
|
||||
initBaseDeployment(as, tenantService)
|
||||
return nil
|
||||
}
|
||||
if serviceType.LabelValue == util.StatefulServiceType {
|
||||
logrus.Debugf("StatefulSet")
|
||||
initBaseStatefulSet(as, tenantService)
|
||||
return nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user