Bug fix: Adding insecureSkipVerify option to realis options and moving realis options out of the zookeeper path only.
This commit is contained in:
parent
91d962f481
commit
71a1eab1d1
1 changed files with 8 additions and 6 deletions
14
cmd/root.go
14
cmd/root.go
|
@ -61,14 +61,8 @@ func connect(cmd *cobra.Command, args []string) {
|
|||
|
||||
// Prefer zookeeper if both ways of connecting are provided
|
||||
if zkAddr != "" {
|
||||
|
||||
// Configure Zookeeper to connect
|
||||
zkOptions := []realis.ZKOpt{ realis.ZKEndpoints(zkAddr), realis.ZKPath("/aurora/scheduler")}
|
||||
|
||||
if clientKey != "" || clientCert != "" || caCertsPath != "" {
|
||||
realisOptions = append(realisOptions, realis.Certspath(caCertsPath), realis.ClientCerts(clientKey, clientCert))
|
||||
}
|
||||
|
||||
realisOptions = append(realisOptions, realis.ZookeeperOptions(zkOptions...))
|
||||
} else if schedAddr != "" {
|
||||
realisOptions = append(realisOptions, realis.SchedulerUrl(schedAddr))
|
||||
|
@ -77,6 +71,14 @@ func connect(cmd *cobra.Command, args []string) {
|
|||
os.Exit(1)
|
||||
}
|
||||
|
||||
// Client certificate configuration if available
|
||||
if clientKey != "" || clientCert != "" || caCertsPath != "" {
|
||||
realisOptions = append(realisOptions,
|
||||
realis.Certspath(caCertsPath),
|
||||
realis.ClientCerts(clientKey, clientCert),
|
||||
realis.InsecureSkipVerify(insecureSkipVerify))
|
||||
}
|
||||
|
||||
// Connect to Aurora Scheduler and create a client object
|
||||
client, err = realis.NewRealisClient(realisOptions...)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue