func newSubnetManager() (subnet.Manager, error) { if opts.remote != "" { return remote.NewRemoteManager(opts.remote, opts.remoteCAFile, opts.remoteCertfile, opts.remoteKeyfile) } cfg := &subnet.EtcdConfig{ Endpoints: strings.Split(opts.etcdEndpoints, ","), Keyfile: opts.etcdKeyfile, Certfile: opts.etcdCertfile, CAFile: opts.etcdCAFile, Prefix: opts.etcdPrefix, } return subnet.NewEtcdManager(cfg) }
func newSubnetManager() (subnet.Manager, error) { if opts.remote != "" { return remote.NewRemoteManager(opts.remote, opts.remoteCAFile, opts.remoteCertfile, opts.remoteKeyfile) } if opts.kubeSubnetMgr { return kube.NewSubnetManager() } cfg := &subnet.EtcdConfig{ Endpoints: strings.Split(opts.etcdEndpoints, ","), Keyfile: opts.etcdKeyfile, Certfile: opts.etcdCertfile, CAFile: opts.etcdCAFile, Prefix: opts.etcdPrefix, Username: opts.etcdUsername, Password: opts.etcdPassword, } return subnet.NewLocalManager(cfg) }