From 025b9c496a89e2f7b94b4e973d07231f7b56d8ab Mon Sep 17 00:00:00 2001 From: goodrain Date: Wed, 14 Mar 2018 12:43:35 +0800 Subject: [PATCH] [REV] update service domain all with port start --- pkg/db/model/tenant.go | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/pkg/db/model/tenant.go b/pkg/db/model/tenant.go index 53f4bb4ad..59db7c217 100644 --- a/pkg/db/model/tenant.go +++ b/pkg/db/model/tenant.go @@ -185,16 +185,7 @@ func (t *TenantServices) Autodomain(tenantName string, containerPort int) string if strings.Contains(exDomain, ":") { exDomain = strings.Split(exDomain, ":")[0] } - if t.PortType == "dif_protocol" { - return fmt.Sprintf("%s.%s.%s", t.ServiceAlias, tenantName, exDomain) - } - if t.PortType == "multi_outer" { - return fmt.Sprintf("%d.%s.%s.%s", containerPort, t.ServiceAlias, tenantName, exDomain) - } - if t.PortType == "one_outer" { - return fmt.Sprintf("%s.%s.%s", t.ServiceAlias, tenantName, exDomain) - } - return "" + return fmt.Sprintf("%d.%s.%s.%s", containerPort, t.ServiceAlias, tenantName, exDomain) } //TableName 表名