How to override the endorser peer url when using gateway #fabric-sdk-java #fabric-kubernetes


Marek Malik <info@...>
 

Hi there, 

I'm having problems with configuring the gateway of my Java Client that sends proposal transactions to the endorser peers that are registered in the channel. 

I'm running my network inside a Kubernetes cluster, but the client is running outside of the cluster. I'm exposing the first peer of each organization using Ingress Controller (this works as I can query the ledger).

I'm able to connect to the first peer, but when the SDK is trying to send the proposal to the other organizations, it tries to connect to the peer using the "default/internal" URLs, which for me are peer0.org2.example.com and peer0.org3.example.com. But because of being outside of the cluster I need to call them using the ingress exposed URLs, so for example peer0.org2.example.com is accessible from this URL: hlf-peers--org2-peer-0.mydomain.com

I was hoping to override the default peer URL using the connection-profile file and specifying the peer using the URL, grpsOptions( hostnameOverride ) but this is not helping. 

Anyone has any ideas where or how I could try to make my gateway override the peers URLs that are used for sending proposals?


Thanks 

Marek 

Join fabric@lists.hyperledger.org to automatically receive all group messages.