From 11edce0908d3f36036a324922d75e3a2e7081112 Mon Sep 17 00:00:00 2001 From: David Taylor Date: Fri, 10 May 2024 15:32:31 +0000 Subject: [PATCH] roachprod: add env var for secure default Release note: none. Epic: none. --- pkg/cmd/roachprod/BUILD.bazel | 1 + pkg/cmd/roachprod/flags.go | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/cmd/roachprod/BUILD.bazel b/pkg/cmd/roachprod/BUILD.bazel index 5118fa963d76..8eec4f079f04 100644 --- a/pkg/cmd/roachprod/BUILD.bazel +++ b/pkg/cmd/roachprod/BUILD.bazel @@ -22,6 +22,7 @@ go_library( "//pkg/roachprod/ui", "//pkg/roachprod/vm", "//pkg/roachprod/vm/gce", + "//pkg/util/envutil", "//pkg/util/flagutil", "//pkg/util/timeutil", "@com_github_cockroachdb_errors//:errors", diff --git a/pkg/cmd/roachprod/flags.go b/pkg/cmd/roachprod/flags.go index 5d24f13e3a11..6b69828e829f 100644 --- a/pkg/cmd/roachprod/flags.go +++ b/pkg/cmd/roachprod/flags.go @@ -22,6 +22,7 @@ import ( "github.com/cockroachdb/cockroach/pkg/roachprod/ssh" "github.com/cockroachdb/cockroach/pkg/roachprod/vm" "github.com/cockroachdb/cockroach/pkg/roachprod/vm/gce" + "github.com/cockroachdb/cockroach/pkg/util/envutil" "github.com/cockroachdb/cockroach/pkg/util/flagutil" "github.com/spf13/cobra" "golang.org/x/exp/maps" @@ -50,7 +51,7 @@ var ( listPattern string isSecure bool // Set based on the values passed to --secure and --insecure secure = true // DEPRECATED - insecure = false + insecure = envutil.EnvOrDefaultBool("COCKROACH_ROACHPROD_INSECURE", false) virtualClusterName string sqlInstance int extraSSHOptions = ""