Browse Source

Merge pull request #2160 from brandond/dqlite_args

Remove lingering references to dqlite
pull/2166/head
Brad Davidson 4 years ago committed by GitHub
parent
commit
9687d814d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      pkg/cli/cmds/dqlite.go
  2. 7
      pkg/cli/cmds/etcd.go
  3. 4
      pkg/cli/cmds/nocluster.go
  4. 9
      pkg/cli/cmds/server.go
  5. 2
      tests/perf/scripts/config
  6. 2
      tests/perf/server/files/server_userdata.tmpl
  7. 2
      tests/perf/server/main.tf

7
pkg/cli/cmds/dqlite.go

@ -1,7 +0,0 @@
// +build dqlite
package cmds
const (
hideDqlite = false
)

7
pkg/cli/cmds/etcd.go

@ -0,0 +1,7 @@
// +build !no_etcd
package cmds
const (
hideClusterFlags = false
)

4
pkg/cli/cmds/nocluster.go

@ -1,7 +1,7 @@
// +build !dqlite
// +build no_etcd
package cmds
const (
hideDqlite = true
hideClusterFlags = true
)

9
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,
},

2
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"

2
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 -

2
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,

Loading…
Cancel
Save