vmware-archive/dispatch

Invalid G/W port in API path

neosab opened this issue · 5 comments

Bug Report

I am seeing an invalid port in the API path. This must be the g/w's tls port 443

root@null [ ~/dispatch ]# dispatch get api
     NAME    | FUNCTION | PROTOCOL | METHOD | DOMAIN |                 PATH                  | AUTH | STATUS | ENABLED
------------------------------------------------------------------------------------------------------------------------
  post-hello | hello-py | https    | POST   |        | https://localhost:8444/dispatch/hello |      | READY  | true
------------------------------------------------------------------------------------------------------------------------

Impact

  • Low - Annoyance, but does not impact business or functionality
  • Medium - Issue can be worked around, but is causing pain
  • High - Blocker

Possible solution

Your Environment

  • Dispatch CLI version (or git commit):
  • Dispatch Chart version (or image[s] tag):
  • Operating System and version:
  • Kubernetes version (and distribution):
  • Etc (any other useful environmental information):

@neosab Here is the reason, In #709
the api gateway port is read from dispatch config file. but in the ova, the file don't contain api-https-port and api-http-port, so it show as default api gateway port 8444 and 8081.
So I think we should modify the config file

@pzmrzy Why is the server reading from config file? It must be reading from the --gateway-tls-port 443 flag right

Yes, the server read the flag, but client read the config file
When do dispatch get api, the server return only the relative url.
The port is been add in the client side

I missed that the URL is constructed by the client. Yup, in that case, we should fix the config file in the OVA.