change listen port to proxy on ext client creation if proxy used on ingress GW

This commit is contained in:
Abhishek Kondur
2022-11-27 22:22:54 +05:30
parent bc45797542
commit 972ded5a2d
4 changed files with 18 additions and 42 deletions

View File

@@ -332,7 +332,11 @@ func createExtClient(w http.ResponseWriter, r *http.Request) {
logic.ReturnErrorResponse(w, r, logic.FormatError(err, "internal"))
return
}
extclient.IngressGatewayEndpoint = node.Endpoint + ":" + strconv.FormatInt(int64(node.ListenPort), 10)
listenPort := node.ListenPort
if node.Proxy {
listenPort = 51722
}
extclient.IngressGatewayEndpoint = node.Endpoint + ":" + strconv.FormatInt(int64(listenPort), 10)
extclient.Enabled = true
parentNetwork, err := logic.GetNetwork(networkName)