From b4d81a9e338b6bd57e05348a426630b8d98d2498 Mon Sep 17 00:00:00 2001 From: Brad Davidson Date: Mon, 24 Aug 2020 15:45:01 -0700 Subject: [PATCH] Remove lingering references to dqlite Signed-off-by: Brad Davidson --- pkg/cli/cmds/dqlite.go | 7 ------- pkg/cli/cmds/etcd.go | 7 +++++++ pkg/cli/cmds/nocluster.go | 4 ++-- pkg/cli/cmds/server.go | 9 +++++---- tests/perf/scripts/config | 2 +- tests/perf/server/files/server_userdata.tmpl | 2 +- tests/perf/server/main.tf | 2 +- 7 files changed, 17 insertions(+), 16 deletions(-) delete mode 100644 pkg/cli/cmds/dqlite.go create mode 100644 pkg/cli/cmds/etcd.go diff --git a/pkg/cli/cmds/dqlite.go b/pkg/cli/cmds/dqlite.go deleted file mode 100644 index b7f77e36cd..0000000000 --- a/pkg/cli/cmds/dqlite.go +++ /dev/null @@ -1,7 +0,0 @@ -// +build dqlite - -package cmds - -const ( - hideDqlite = false -) diff --git a/pkg/cli/cmds/etcd.go b/pkg/cli/cmds/etcd.go new file mode 100644 index 0000000000..f51acb7bb4 --- /dev/null +++ b/pkg/cli/cmds/etcd.go @@ -0,0 +1,7 @@ +// +build !no_etcd + +package cmds + +const ( + hideClusterFlags = false +) diff --git a/pkg/cli/cmds/nocluster.go b/pkg/cli/cmds/nocluster.go index 946b60f0c4..92b5ff23a0 100644 --- a/pkg/cli/cmds/nocluster.go +++ b/pkg/cli/cmds/nocluster.go @@ -1,7 +1,7 @@ -// +build !dqlite +// +build no_etcd package cmds const ( - hideDqlite = true + hideClusterFlags = true ) diff --git a/pkg/cli/cmds/server.go b/pkg/cli/cmds/server.go index 5746ac59d6..7c39205bf6 100644 --- a/pkg/cli/cmds/server.go +++ b/pkg/cli/cmds/server.go @@ -275,21 +275,22 @@ func NewServerCommand(action func(*cli.Context) error) *cli.Command { }, &cli.StringFlag{ Name: "server,s", + Hidden: hideClusterFlags, Usage: "(experimental/cluster) Server to connect to, used to join a cluster", EnvVars: []string{version.ProgramUpper + "_URL"}, Destination: &ServerConfig.ServerURL, }, &cli.BoolFlag{ Name: "cluster-init", - Hidden: hideDqlite, - Usage: "(experimental/cluster) Initialize new cluster master", + Hidden: hideClusterFlags, + Usage: "(experimental/cluster) Initialize a new cluster", EnvVars: []string{version.ProgramUpper + "_CLUSTER_INIT"}, Destination: &ServerConfig.ClusterInit, }, &cli.BoolFlag{ Name: "cluster-reset", - Hidden: hideDqlite, - Usage: "(experimental/cluster) Forget all peers and become a single cluster new cluster master", + Hidden: hideClusterFlags, + Usage: "(experimental/cluster) Forget all peers and become sole member of a new cluster", EnvVars: []string{version.ProgramUpper + "_CLUSTER_RESET"}, Destination: &ServerConfig.ClusterReset, }, diff --git a/tests/perf/scripts/config b/tests/perf/scripts/config index 5467439d05..c1350d739f 100755 --- a/tests/perf/scripts/config +++ b/tests/perf/scripts/config @@ -11,7 +11,7 @@ DEBUG=1 ## K3S DB VARIABLES ## ########################## -DB_ENGINE="dqlite" +DB_ENGINE="embedded-etcd" DB_INSTANCE_TYPE="db.m4.4xlarge" DB_NAME="k3s" DB_USERNAME="k3suser" diff --git a/tests/perf/server/files/server_userdata.tmpl b/tests/perf/server/files/server_userdata.tmpl index e831429736..d412118b57 100644 --- a/tests/perf/server/files/server_userdata.tmpl +++ b/tests/perf/server/files/server_userdata.tmpl @@ -25,7 +25,7 @@ write_files: fi while true; do - if [ ${db_engine} == "dqlite" ]; then + if [ ${db_engine} == "embedded-etcd" ]; then curl -sfL https://get.k3s.io | K3S_CLUSTER_SECRET="${k3s_cluster_secret}" \ INSTALL_K3S_VERSION="${install_k3s_version}" \ INSTALL_K3S_EXEC="${k3s_server_args} --cluster-cidr=10.0.0.0/8 --no-deploy traefik --no-deploy servicelb --tls-san ${lb_address} %{ if master_index != 0 } --server https://${lb_address}:6443 %{ else } --cluster-init %{ endif }" sh - diff --git a/tests/perf/server/main.tf b/tests/perf/server/main.tf index 0e5e1895c8..6ad974d098 100644 --- a/tests/perf/server/main.tf +++ b/tests/perf/server/main.tf @@ -156,7 +156,7 @@ resource "aws_instance" "k3s-server" { install_k3s_version = local.install_k3s_version, k3s_server_args = var.k3s_server_args, db_engine = var.db_engine, - db_address = "${var.db_engine == "etcd" ? join(",",aws_instance.k3s_etcd.*.private_ip) : var.db_engine == "dqlite" ? "null" : aws_db_instance.k3s_db[0].address}", + db_address = "${var.db_engine == "etcd" ? join(",",aws_instance.k3s_etcd.*.private_ip) : var.db_engine == "embedded-etcd" ? "null" : aws_db_instance.k3s_db[0].address}", db_name = var.db_name, db_username = var.db_username, db_password = var.db_password,