Added configuration option to change the probe's listen address.
Change-Id: I7e8aa7bf4a4756f12211e7108cabcdc86aacd78a
diff --git a/ro_core/config/config.go b/ro_core/config/config.go
index be78228..28cde01 100644
--- a/ro_core/config/config.go
+++ b/ro_core/config/config.go
@@ -43,6 +43,7 @@
default_ROCoreCert = "pki/voltha.crt"
default_ROCoreCA = "pki/voltha-CA.pem"
default_Affinity_Router_Topic = "affinityRouter"
+ default_ProbeHost = ""
default_ProbePort = 8080
)
@@ -66,6 +67,7 @@
ROCoreCert string
ROCoreCA string
AffinityRouterTopic string
+ ProbeHost string
ProbePort int
}
@@ -93,6 +95,7 @@
ROCoreCert: default_ROCoreCert,
ROCoreCA: default_ROCoreCA,
AffinityRouterTopic: default_Affinity_Router_Topic,
+ ProbeHost: default_ProbeHost,
ProbePort: default_ProbePort,
}
return &roCoreFlag
@@ -142,6 +145,9 @@
help = fmt.Sprintf("Show version information and exit")
flag.BoolVar(&cf.DisplayVersionOnly, "version", default_DisplayVersionOnly, help)
+ help = fmt.Sprintf("The address on which to listen to answer liveness and readiness probe queries over HTTP.")
+ flag.StringVar(&(cf.ProbeHost), "probe_host", default_ProbeHost, help)
+
help = fmt.Sprintf("The port on which to listen to answer liveness and readiness probe queries over HTTP.")
flag.IntVar(&(cf.ProbePort), "probe_port", default_ProbePort, help)