Ver Fonte

cmd/kg: listen on all stacks without localhost

Today, net.Listen will only listen on 127.0.0.1 if localhost is passed
[0]. Listening on `:8080` will open a dualstack socket on OSs that
support it.
[0] https://github.com/golang/go/issues/9334
Lucas Servén Marín há 7 anos atrás
pai
commit
614f2e1c5d
1 ficheiros alterados com 1 adições e 1 exclusões
  1. 1 1
      cmd/kg/main.go

+ 1 - 1
cmd/kg/main.go

@@ -77,7 +77,7 @@ func Main() error {
 	granularity := flag.String("mesh-granularity", string(mesh.DataCenterGranularity), fmt.Sprintf("The granularity of the network mesh to create. Possible values: %s", availableGranularities))
 	kubeconfig := flag.String("kubeconfig", "", "Path to kubeconfig.")
 	hostname := flag.String("hostname", "", "Hostname of the node on which this process is running.")
-	listen := flag.String("listen", "localhost:1107", "The address at which to listen for health and metrics.")
+	listen := flag.String("listen", ":1107", "The address at which to listen for health and metrics.")
 	local := flag.Bool("local", true, "Should Kilo manage routes within a location.")
 	logLevel := flag.String("log-level", logLevelInfo, fmt.Sprintf("Log level to use. Possible values: %s", availableLogLevels))
 	master := flag.String("master", "", "The address of the Kubernetes API server (overrides any value in kubeconfig).")