|
@@ -315,6 +315,8 @@ struct TCommonAppOptions {
|
|
|
TString GRpcPublicHost = "";
|
|
|
ui32 GRpcPublicPort = 0;
|
|
|
ui32 GRpcsPublicPort = 0;
|
|
|
+ TString PGWireAddress = "";
|
|
|
+ ui32 PGWirePort = 0;
|
|
|
TVector<TString> GRpcPublicAddressesV4;
|
|
|
TVector<TString> GRpcPublicAddressesV6;
|
|
|
TString GRpcPublicTargetNameOverride = "";
|
|
@@ -326,7 +328,7 @@ struct TCommonAppOptions {
|
|
|
bool SysLogEnabled = false;
|
|
|
bool TcpEnabled = false;
|
|
|
bool SuppressVersionCheck = false;
|
|
|
- EWorkload Workload = EWorkload::Hybrid;
|
|
|
+ EWorkload Workload = EWorkload::Hybrid;
|
|
|
|
|
|
void RegisterCliOptions(NLastGetopt::TOpts& opts) {
|
|
|
opts.AddLongOption("cluster-name", "which cluster this node belongs to")
|
|
@@ -383,6 +385,8 @@ struct TCommonAppOptions {
|
|
|
opts.AddLongOption("grpc-public-host", "set public gRPC host for discovery").RequiredArgument("HOST").StoreResult(&GRpcPublicHost);
|
|
|
opts.AddLongOption("grpc-public-port", "set public gRPC port for discovery").RequiredArgument("PORT").StoreResult(&GRpcPublicPort);
|
|
|
opts.AddLongOption("grpcs-public-port", "set public gRPC SSL port for discovery").RequiredArgument("PORT").StoreResult(&GRpcsPublicPort);
|
|
|
+ opts.AddLongOption("pgwire-address", "set host for listen postgres protocol").RequiredArgument("ADDR").StoreResult(&PGWireAddress);
|
|
|
+ opts.AddLongOption("pgwire-port", "set port for listen postgres protocol").OptionalArgument("PORT").StoreResult(&PGWirePort);
|
|
|
opts.AddLongOption("grpc-public-address-v4", "set public ipv4 address for discovery").RequiredArgument("ADDR").EmplaceTo(&GRpcPublicAddressesV4);
|
|
|
opts.AddLongOption("grpc-public-address-v6", "set public ipv6 address for discovery").RequiredArgument("ADDR").EmplaceTo(&GRpcPublicAddressesV6);
|
|
|
opts.AddLongOption("grpc-public-target-name-override", "set public hostname override for TLS in discovery").RequiredArgument("HOST").StoreResult(&GRpcPublicTargetNameOverride);
|
|
@@ -496,7 +500,7 @@ struct TCommonAppOptions {
|
|
|
if (offset) {
|
|
|
connectorConfig.MutableEndpoint()->Setport(InterconnectPort + offset) ;
|
|
|
|
|
|
- // Assign default hostname 'localhost', because
|
|
|
+ // Assign default hostname 'localhost', because
|
|
|
// connector is usually deployed to the same host as the dynamic node.
|
|
|
if (connectorConfig.GetEndpoint().host().Empty()) {
|
|
|
connectorConfig.MutableEndpoint()->Sethost("localhost");
|
|
@@ -597,6 +601,12 @@ struct TCommonAppOptions {
|
|
|
}
|
|
|
ConfigUpdateTracer.AddUpdate(NKikimrConsole::TConfigItem::GRpcConfigItem, TConfigItemInfo::EUpdateKind::UpdateExplicitly);
|
|
|
}
|
|
|
+ if (PGWireAddress) {
|
|
|
+ appConfig.MutableLocalPgWireConfig()->SetAddress(PGWireAddress);
|
|
|
+ }
|
|
|
+ if (PGWirePort) {
|
|
|
+ appConfig.MutableLocalPgWireConfig()->SetListeningPort(PGWirePort);
|
|
|
+ }
|
|
|
for (const auto& addr : GRpcPublicAddressesV4) {
|
|
|
appConfig.MutableGRpcConfig()->AddPublicAddressesV4(addr);
|
|
|
}
|
|
@@ -658,7 +668,7 @@ struct TCommonAppOptions {
|
|
|
ApplyDontStartGrpcProxy(*appConfig.MutableGRpcConfig(), ConfigUpdateTracer);
|
|
|
break;
|
|
|
case EWorkload::Hybrid:
|
|
|
- // default, do nothing
|
|
|
+ // default, do nothing
|
|
|
break;
|
|
|
}
|
|
|
}
|