From 4cf5a4c108dc928db8b86832f6aa126e337e43af Mon Sep 17 00:00:00 2001 From: Daniel Cleyrat Date: Tue, 28 Mar 2023 06:30:49 -0700 Subject: [PATCH] use insecure flag from KubectlConfig --- cmd/datactl/app/sources/add/add_dataservice.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/datactl/app/sources/add/add_dataservice.go b/cmd/datactl/app/sources/add/add_dataservice.go index b45dee8..68c1623 100644 --- a/cmd/datactl/app/sources/add/add_dataservice.go +++ b/cmd/datactl/app/sources/add/add_dataservice.go @@ -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" @@ -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()