fix vs proxy host

This commit is contained in:
pengluan 2022-05-24 17:32:59 +08:00
parent cfee5a91d8
commit 01d5fb603e
4 changed files with 6 additions and 4 deletions

View File

@ -716,7 +716,7 @@ HELP_URL={
"service":"https://github.com/tencentmusic/cube-studio/tree/master/docs/example", "service":"https://github.com/tencentmusic/cube-studio/tree/master/docs/example",
"inferenceservice":"https://github.com/tencentmusic/cube-studio/tree/master/docs/example", "inferenceservice":"https://github.com/tencentmusic/cube-studio/tree/master/docs/example",
"run":"https://github.com/tencentmusic/cube-studio/tree/master/docs/example", "run":"https://github.com/tencentmusic/cube-studio/tree/master/docs/example",
"docker":"https://github.com/tencentmusic/cube-studio/tree/master/docs/example" "docker":"https://github.com/tencentmusic/cube-studio/tree/master/images"
} }
# 不使用模板中定义的镜像而直接使用用户镜像的模板名称 # 不使用模板中定义的镜像而直接使用用户镜像的模板名称

View File

@ -716,7 +716,7 @@ HELP_URL={
"service":"https://github.com/tencentmusic/cube-studio/tree/master/docs/example", "service":"https://github.com/tencentmusic/cube-studio/tree/master/docs/example",
"inferenceservice":"https://github.com/tencentmusic/cube-studio/tree/master/docs/example", "inferenceservice":"https://github.com/tencentmusic/cube-studio/tree/master/docs/example",
"run":"https://github.com/tencentmusic/cube-studio/tree/master/docs/example", "run":"https://github.com/tencentmusic/cube-studio/tree/master/docs/example",
"docker":"https://github.com/tencentmusic/cube-studio/tree/master/docs/example" "docker":"https://github.com/tencentmusic/cube-studio/tree/master/images"
} }
# 不使用模板中定义的镜像而直接使用用户镜像的模板名称 # 不使用模板中定义的镜像而直接使用用户镜像的模板名称

View File

@ -517,7 +517,8 @@ class NNI_ModelView_Base():
host = nni.project.cluster.get('NNI_DOMAIN',request.host) host = nni.project.cluster.get('NNI_DOMAIN',request.host)
if not host: if not host:
host=request.host host=request.host
if ':' in host:
host = host[:host.rindex(':')] # 如果捕获到端口号,要去掉
vs_json = { vs_json = {
"apiVersion": "networking.istio.io/v1alpha3", "apiVersion": "networking.istio.io/v1alpha3",
"kind": "VirtualService", "kind": "VirtualService",

View File

@ -375,7 +375,8 @@ class Notebook_ModelView_Base():
host = notebook.project.cluster.get('JUPYTER_DOMAIN',request.host) host = notebook.project.cluster.get('JUPYTER_DOMAIN',request.host)
if not host: if not host:
host=request.host host=request.host
if ':' in host:
host = host[:host.rindex(':')] # 如果捕获到端口号,要去掉
crd_json = { crd_json = {
"apiVersion": "networking.istio.io/v1alpha3", "apiVersion": "networking.istio.io/v1alpha3",
"kind": "VirtualService", "kind": "VirtualService",