|
@@ -47,6 +47,8 @@ type CmdLineOpts struct {
|
|
etcdKeyfile string
|
|
etcdKeyfile string
|
|
etcdCertfile string
|
|
etcdCertfile string
|
|
etcdCAFile string
|
|
etcdCAFile string
|
|
|
|
+ etcdUsername string
|
|
|
|
+ etcdPassword string
|
|
help bool
|
|
help bool
|
|
version bool
|
|
version bool
|
|
listen string
|
|
listen string
|
|
@@ -64,6 +66,8 @@ func init() {
|
|
flag.StringVar(&opts.etcdKeyfile, "etcd-keyfile", "", "SSL key file used to secure etcd communication")
|
|
flag.StringVar(&opts.etcdKeyfile, "etcd-keyfile", "", "SSL key file used to secure etcd communication")
|
|
flag.StringVar(&opts.etcdCertfile, "etcd-certfile", "", "SSL certification file used to secure etcd communication")
|
|
flag.StringVar(&opts.etcdCertfile, "etcd-certfile", "", "SSL certification file used to secure etcd communication")
|
|
flag.StringVar(&opts.etcdCAFile, "etcd-cafile", "", "SSL Certificate Authority file used to secure etcd communication")
|
|
flag.StringVar(&opts.etcdCAFile, "etcd-cafile", "", "SSL Certificate Authority file used to secure etcd communication")
|
|
|
|
+ flag.StringVar(&opts.etcdUsername, "etcd-username", "", "Username for BasicAuth to etcd")
|
|
|
|
+ flag.StringVar(&opts.etcdPassword, "etcd-password", "", "Password for BasicAuth to etcd")
|
|
flag.StringVar(&opts.listen, "listen", "", "run as server and listen on specified address (e.g. ':8080')")
|
|
flag.StringVar(&opts.listen, "listen", "", "run as server and listen on specified address (e.g. ':8080')")
|
|
flag.StringVar(&opts.remote, "remote", "", "run as client and connect to server on specified address (e.g. '10.1.2.3:8080')")
|
|
flag.StringVar(&opts.remote, "remote", "", "run as client and connect to server on specified address (e.g. '10.1.2.3:8080')")
|
|
flag.StringVar(&opts.remoteKeyfile, "remote-keyfile", "", "SSL key file used to secure client/server communication")
|
|
flag.StringVar(&opts.remoteKeyfile, "remote-keyfile", "", "SSL key file used to secure client/server communication")
|
|
@@ -84,6 +88,8 @@ func newSubnetManager() (subnet.Manager, error) {
|
|
Certfile: opts.etcdCertfile,
|
|
Certfile: opts.etcdCertfile,
|
|
CAFile: opts.etcdCAFile,
|
|
CAFile: opts.etcdCAFile,
|
|
Prefix: opts.etcdPrefix,
|
|
Prefix: opts.etcdPrefix,
|
|
|
|
+ Username: opts.etcdUsername,
|
|
|
|
+ Password: opts.etcdPassword,
|
|
}
|
|
}
|
|
|
|
|
|
return subnet.NewLocalManager(cfg)
|
|
return subnet.NewLocalManager(cfg)
|