diff --git a/db/mysql/dao/tenants.go b/db/mysql/dao/tenants.go index 7221c07a5..30c16d05b 100644 --- a/db/mysql/dao/tenants.go +++ b/db/mysql/dao/tenants.go @@ -162,6 +162,7 @@ func (t *TenantServicesDaoImpl) GetAllServices() ([]*model.TenantServices, error return services, nil } +//GetAllServicesID get all service sample info func (t *TenantServicesDaoImpl) GetAllServicesID() ([]*model.TenantServices, error) { var services []*model.TenantServices if err := t.DB.Select("service_id,service_alias,tenant_id").Find(&services).Error; err != nil { @@ -175,7 +176,7 @@ func (t *TenantServicesDaoImpl) GetAllServicesID() ([]*model.TenantServices, err //UpdateDeployVersion update service current deploy version func (t *TenantServicesDaoImpl) UpdateDeployVersion(serviceID, deployversion string) error { - if err := t.DB.Raw("update tenant_services set deploy_version=? where service_id=?", deployversion, serviceID).Error; err != nil { + if err := t.DB.Exec("update tenant_services set deploy_version=? where service_id=?", deployversion, serviceID).Error; err != nil { return err } return nil diff --git a/worker/appm/conversion/version.go b/worker/appm/conversion/version.go index a493abcdd..5751f740b 100644 --- a/worker/appm/conversion/version.go +++ b/worker/appm/conversion/version.go @@ -645,6 +645,7 @@ func createNodeSelector(as *v1.AppService, dbmanager db.Manager) map[string]stri if err == nil && labels != nil && len(labels) > 0 { for _, l := range labels { if strings.Contains(l.LabelValue, "=") { + kv := strings.SplitN(l.LabelValue, "=", 1) selector[kv[0]] = kv[1] } else { selector["rainbond_node_lable_"+l.LabelValue] = "true"