config: adds an extra tls ip to config

This commit adds the `tlsextraip` flag to the cli to add an
ip to the generated certificate. This is usefull when using
a loadbalancer to access the node.
This commit is contained in:
Juan Ignacio Donoso authored and Olaoluwa Osuntokun committed 2018-02-08 15:23:52 -08:00
1 parent 8cb2097db2
commit bb42cb55ba
2 files changed
+7

No files matched your search

+6
View File
@@ -608,6 +608,12 @@ func genCertPair(certFile, keyFile string) error {
}
}
// Add extra IP to the slice.
ipAddr := net.ParseIP(cfg.TLSExtraIP)
if ipAddr != nil {
addIP(ipAddr)
}
// Collect the host's names into a slice.
host, err := os.Hostname()
if err != nil {