From 2b0d61eb189273c03b7c4eb956f4b1cab5d26dba Mon Sep 17 00:00:00 2001 From: Neil-Jocelyn Schark <neil.schark@h-da.de> Date: Fri, 7 Jun 2024 10:05:54 +0000 Subject: [PATCH] Switch passthrough flags to work the other way See merge request danet/quant!143 --- README.md | 8 ++++---- goKMS/main.go | 8 ++++---- quantumlayer/main/main.go | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 9b7b0412..3f5692ee 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 fa442494..3ee07e40 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 1864dc8a..545dea77 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 == "" { -- GitLab