update service proxy ip

This commit is contained in:
cdllp2 2022-10-24 17:16:59 +08:00
parent 2df52f94a0
commit 646d562ef0
2 changed files with 2 additions and 2 deletions

View File

@ -263,7 +263,7 @@ class InferenceService(Model,AuditMixinNullable,MyappModelBase,service_common):
@property @property
def inference_host_url(self): def inference_host_url(self):
url = "http://" + self.name + "." + self.project.cluster.get('SERVICE_DOMAIN',conf.get('SERVICE_DOMAIN')) url = "http://" + self.name + "." + self.project.cluster.get('SERVICE_DOMAIN','')
if self.host: if self.host:
if 'http://' in self.host or 'https://' in self.host: if 'http://' in self.host or 'https://' in self.host:
url = self.host url = self.host

View File

@ -872,7 +872,7 @@ output %s
selector=labels selector=labels
) )
# 如果域名配置的gateway就用这个 # 如果域名配置的gateway就用这个
host = service.name+"."+ service.project.cluster.get('SERVICE_DOMAIN',conf.get('SERVICE_DOMAIN')) host = service.name+"."+ service.project.cluster.get('SERVICE_DOMAIN','')
if service.host: if service.host:
host=service.host.replace('http://','').replace('https://','').strip() host=service.host.replace('http://','').replace('https://','').strip()