mirror of
https://gitee.com/rainbond/Rainbond.git
synced 2024-12-02 11:47:36 +08:00
[FIX] fix bug: cant not convert in Deployment and StatefulSet
This commit is contained in:
parent
7ba3e8d94e
commit
2d8fcaf64f
@ -21,6 +21,7 @@ package store
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"github.com/goodrain/rainbond/util"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
@ -468,6 +469,15 @@ func (a *appRuntimeStore) GetAppService(serviceID string) *v1.AppService {
|
||||
app, ok := a.appServices.Load(key)
|
||||
if ok {
|
||||
appService := app.(*v1.AppService)
|
||||
serviceType, err := a.dbmanager.TenantServiceLabelDao().GetTenantServiceTypeLabel(serviceID)
|
||||
if err != nil {
|
||||
logrus.Warningf("error getting TenantServiceTypeLabel(serviceID=%s): %v", serviceID, serviceType)
|
||||
}
|
||||
if serviceType == nil || serviceType.LabelValue == util.StatelessServiceType {
|
||||
appService.SetStatefulSet(nil)
|
||||
} else if serviceType.LabelValue == util.StatefulServiceType {
|
||||
appService.SetDeployment(nil)
|
||||
}
|
||||
return appService
|
||||
}
|
||||
return nil
|
||||
|
Loading…
Reference in New Issue
Block a user