diff --git a/README.md b/README.md index 9b7b04123bbbb9ef9be5eda52a5b1696b1fc4ffb..3f5692ee24874ea615325d98fe11384dce606e3a 100644 --- a/README.md +++ b/README.md @@ -83,8 +83,8 @@ Usage of goKMS: address to bind gNMI to (overwrites settings in config file) (default ":7030") -gnmiTLS If true do use TLS for gNMI, paths to ca, cert and key must be set aswell (overwrites settings in config file) - -grpcPassthrough - set the default resolve scheme for grpc to passthrough, default is true + -noGRPCPassthrough + set the default resolve scheme for grpc to not use passthrough, default is false -keyFile string location of the gNMI key file (overwrites settings in config file) -kms_config string @@ -175,8 +175,8 @@ Also available are the following arguments: Usage of quantumlayer: -config string path to the config file - -grpcPassthrough - set the default resolve scheme for grpc to passthrough, default is true (default true) + -noGRPCPassthrough + set the default resolve scheme for grpc to not use passthrough, default is false (default false) -log string logrus lof level (debug, info, warn, error, fatal, panic), default: info (default "info") ``` diff --git a/goKMS/main.go b/goKMS/main.go index fa442494fb19eb97f0fed266ef3e1a887fdda2b5..3ee07e40e577da5a4b9c74d2e179c9878aec4583 100644 --- a/goKMS/main.go +++ b/goKMS/main.go @@ -55,15 +55,15 @@ func main() { certFile := flag.String("certFile", "", "location of the gNMI cert file (overwrites settings in config file)") keyFile := flag.String("keyFile", "", "location of the gNMI key file (overwrites settings in config file)") caFile := flag.String("caFile", "", "location of the gNMI ca file (overwrites settings in config file)") - gRPCPassthrough := flag.Bool("grpcPassthrough", true, "set the default resolve scheme for grpc to passthrough, default is true") + noGRPCPassthrough := flag.Bool("noGRPCPassthrough", true, "set the default resolve scheme for grpc to not use passthrough, default is false") flag.Parse() - if *gRPCPassthrough { + if *noGRPCPassthrough { + log.Info("gRPC default resolver scheme is not set to passthrough. This might cause issues with the gRPC connection when no real DNS server is available as each gRPC requests requires a DNS request.") + } else { log.Info("Setting gRPC default resolver scheme to passthrough. No DNS queries are being made when doing a gRPC request.") resolver.SetDefaultScheme("passthrough") - } else { - log.Info("gRPC default resolver scheme is not set to passthrough. This might cause issues with the gRPC connection when no real DNS server is available as each gRPC requests requires a DNS request.") } // parse string, this is built-in feature of logrus diff --git a/quantumlayer/main/main.go b/quantumlayer/main/main.go index 1864dc8ae867aa7a1de0e50637087105d7e885de..545dea773ca3a67fbb0731059be718157c8b71ff 100644 --- a/quantumlayer/main/main.go +++ b/quantumlayer/main/main.go @@ -27,15 +27,15 @@ type Config struct { func main() { configPath := flag.String("config", "", "path to the config file") logLevel := flag.String("log", "info", "logrus lof level (debug, info, warn, error, fatal, panic), default: info") - gRPCPassthrough := flag.Bool("grpcPassthrough", true, "set the default resolve scheme for grpc to passthrough, default is true") + noGRPCPassthrough := flag.Bool("noGRPCPassthrough", true, "set the default resolve scheme for grpc to not use passthrough, default is false") flag.Parse() - if *gRPCPassthrough { + if *noGRPCPassthrough { + logrus.Info("gRPC default resolver scheme is not set to passthrough. This might cause issues with the gRPC connection when no real DNS server is available as each gRPC requests requires a DNS request.") + } else { logrus.Info("Setting gRPC default resolver scheme to passthrough. No DNS queries are being made when doing a gRPC request.") resolver.SetDefaultScheme("passthrough") - } else { - logrus.Info("gRPC default resolver scheme is not set to passthrough. This might cause issues with the gRPC connection when no real DNS server is available as each gRPC requests requires a DNS request.") } if *configPath == "" {