mirror of
https://gitee.com/rainbond/Rainbond.git
synced 2024-12-02 19:57:42 +08:00
[FIX] fix bug: no service and ingress
This commit is contained in:
parent
4f524e34d8
commit
4207174399
@ -36,7 +36,6 @@ import (
|
||||
|
||||
//TenantServicePlugin conv service all plugin
|
||||
func TenantServicePlugin(as *typesv1.AppService, dbmanager db.Manager) error {
|
||||
logrus.Debugf("exec TenantServicePlugin...")
|
||||
initContainers, pluginContainers, err := createPluginsContainer(as, dbmanager)
|
||||
if err != nil {
|
||||
return err
|
||||
|
@ -36,7 +36,6 @@ import (
|
||||
|
||||
//ServiceSource conv ServiceSource
|
||||
func ServiceSource(as *v1.AppService, dbmanager db.Manager) error {
|
||||
logrus.Debugf("exec ServiceSource...")
|
||||
sscs, err := dbmanager.ServiceSourceDao().GetServiceSource(as.ServiceID)
|
||||
if err != nil {
|
||||
if err == gorm.ErrRecordNotFound {
|
||||
@ -81,7 +80,6 @@ func int32Ptr(i int) *int32 {
|
||||
|
||||
//TenantServiceBase conv tenant service base info
|
||||
func TenantServiceBase(as *v1.AppService, dbmanager db.Manager) error {
|
||||
logrus.Debugf("exec TenantServiceBase...")
|
||||
tenantService, err := dbmanager.TenantServiceDao().GetServiceByID(as.ServiceID)
|
||||
if err != nil {
|
||||
if err == gorm.ErrRecordNotFound {
|
||||
|
@ -43,7 +43,6 @@ import (
|
||||
|
||||
//TenantServiceVersion service deploy version conv. define pod spec
|
||||
func TenantServiceVersion(as *v1.AppService, dbmanager db.Manager) error {
|
||||
logrus.Debugf("exec TenantServiceVersion...")
|
||||
version, err := dbmanager.VersionInfoDao().GetVersionByDeployVersion(as.DeployVersion, as.ServiceID)
|
||||
if err != nil {
|
||||
return fmt.Errorf("get service deploy version failure %s", err.Error())
|
||||
|
@ -22,6 +22,7 @@ import (
|
||||
"context"
|
||||
"fmt"
|
||||
"reflect"
|
||||
"strings"
|
||||
|
||||
"github.com/Sirupsen/logrus"
|
||||
"github.com/goodrain/rainbond/cmd/worker/option"
|
||||
@ -326,10 +327,10 @@ func (m *Manager) applyRuleExec(task *model.Task) error {
|
||||
logrus.Errorf("Can't convert %s to *model.ApplyRuleTaskBody", reflect.TypeOf(task.Body))
|
||||
return fmt.Errorf("Can't convert %s to *model.ApplyRuleTaskBody", reflect.TypeOf(task.Body))
|
||||
}
|
||||
logrus.Debugf("ApplyRuleTask action: %s", body.Action)
|
||||
logger := event.GetManager().GetLogger(body.EventID)
|
||||
oldAppService := m.store.GetAppService(body.ServiceID)
|
||||
if oldAppService == nil || oldAppService.IsClosed() {
|
||||
if (oldAppService == nil || oldAppService.IsClosed()) && strings.Contains(body.Action, "port") {
|
||||
logrus.Debugf("service is closed,no need handle")
|
||||
logger.Info("service is closed,no need handle", controller.GetLastLoggerOption())
|
||||
event.GetManager().ReleaseLogger(logger)
|
||||
return nil
|
||||
|
Loading…
Reference in New Issue
Block a user