Skip to content

Commit

Permalink
use insecure flag from KubectlConfig
Browse files Browse the repository at this point in the history
  • Loading branch information
dacleyra committed Mar 28, 2023
1 parent 6966375 commit 4cf5a4c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmd/datactl/app/sources/add/add_dataservice.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (
"time"

"emperror.dev/errors"
"github.com/gotidy/ptr"
"github.com/manifoldco/promptui"
datactlapi "github.com/redhat-marketplace/datactl/pkg/datactl/api"
"github.com/redhat-marketplace/datactl/pkg/datactl/config"
Expand Down Expand Up @@ -156,7 +157,7 @@ func (init *addDataServiceOptions) discoverDataServiceCA() error {
// DataService cert uses serving-certs-ca-bundle, so the CA should already be in the pool
// via the kube context. A user or test can still specify --insecure-skip-tls-verify
conf := &tls.Config{
InsecureSkipVerify: init.dataServiceConfig.InsecureSkipTLSVerify,
InsecureSkipVerify: ptr.ToBool(init.rhmConfigFlags.KubectlConfig.Insecure),
}

pool, err := x509.SystemCertPool()
Expand Down

0 comments on commit 4cf5a4c

Please sign in to comment.