mirror of https://github.com/k3s-io/k3s
Remove lingering references to dqlite
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>pull/2160/head
parent
30f672b72a
commit
b4d81a9e33
|
@ -1,7 +0,0 @@
|
||||||
// +build dqlite
|
|
||||||
|
|
||||||
package cmds
|
|
||||||
|
|
||||||
const (
|
|
||||||
hideDqlite = false
|
|
||||||
)
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
// +build !no_etcd
|
||||||
|
|
||||||
|
package cmds
|
||||||
|
|
||||||
|
const (
|
||||||
|
hideClusterFlags = false
|
||||||
|
)
|
|
@ -1,7 +1,7 @@
|
||||||
// +build !dqlite
|
// +build no_etcd
|
||||||
|
|
||||||
package cmds
|
package cmds
|
||||||
|
|
||||||
const (
|
const (
|
||||||
hideDqlite = true
|
hideClusterFlags = true
|
||||||
)
|
)
|
||||||
|
|
|
@ -275,21 +275,22 @@ func NewServerCommand(action func(*cli.Context) error) *cli.Command {
|
||||||
},
|
},
|
||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
Name: "server,s",
|
Name: "server,s",
|
||||||
|
Hidden: hideClusterFlags,
|
||||||
Usage: "(experimental/cluster) Server to connect to, used to join a cluster",
|
Usage: "(experimental/cluster) Server to connect to, used to join a cluster",
|
||||||
EnvVars: []string{version.ProgramUpper + "_URL"},
|
EnvVars: []string{version.ProgramUpper + "_URL"},
|
||||||
Destination: &ServerConfig.ServerURL,
|
Destination: &ServerConfig.ServerURL,
|
||||||
},
|
},
|
||||||
&cli.BoolFlag{
|
&cli.BoolFlag{
|
||||||
Name: "cluster-init",
|
Name: "cluster-init",
|
||||||
Hidden: hideDqlite,
|
Hidden: hideClusterFlags,
|
||||||
Usage: "(experimental/cluster) Initialize new cluster master",
|
Usage: "(experimental/cluster) Initialize a new cluster",
|
||||||
EnvVars: []string{version.ProgramUpper + "_CLUSTER_INIT"},
|
EnvVars: []string{version.ProgramUpper + "_CLUSTER_INIT"},
|
||||||
Destination: &ServerConfig.ClusterInit,
|
Destination: &ServerConfig.ClusterInit,
|
||||||
},
|
},
|
||||||
&cli.BoolFlag{
|
&cli.BoolFlag{
|
||||||
Name: "cluster-reset",
|
Name: "cluster-reset",
|
||||||
Hidden: hideDqlite,
|
Hidden: hideClusterFlags,
|
||||||
Usage: "(experimental/cluster) Forget all peers and become a single cluster new cluster master",
|
Usage: "(experimental/cluster) Forget all peers and become sole member of a new cluster",
|
||||||
EnvVars: []string{version.ProgramUpper + "_CLUSTER_RESET"},
|
EnvVars: []string{version.ProgramUpper + "_CLUSTER_RESET"},
|
||||||
Destination: &ServerConfig.ClusterReset,
|
Destination: &ServerConfig.ClusterReset,
|
||||||
},
|
},
|
||||||
|
|
|
@ -11,7 +11,7 @@ DEBUG=1
|
||||||
|
|
||||||
## K3S DB VARIABLES ##
|
## K3S DB VARIABLES ##
|
||||||
##########################
|
##########################
|
||||||
DB_ENGINE="dqlite"
|
DB_ENGINE="embedded-etcd"
|
||||||
DB_INSTANCE_TYPE="db.m4.4xlarge"
|
DB_INSTANCE_TYPE="db.m4.4xlarge"
|
||||||
DB_NAME="k3s"
|
DB_NAME="k3s"
|
||||||
DB_USERNAME="k3suser"
|
DB_USERNAME="k3suser"
|
||||||
|
|
|
@ -25,7 +25,7 @@ write_files:
|
||||||
fi
|
fi
|
||||||
|
|
||||||
while true; do
|
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}" \
|
curl -sfL https://get.k3s.io | K3S_CLUSTER_SECRET="${k3s_cluster_secret}" \
|
||||||
INSTALL_K3S_VERSION="${install_k3s_version}" \
|
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 -
|
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 -
|
||||||
|
|
|
@ -156,7 +156,7 @@ resource "aws_instance" "k3s-server" {
|
||||||
install_k3s_version = local.install_k3s_version,
|
install_k3s_version = local.install_k3s_version,
|
||||||
k3s_server_args = var.k3s_server_args,
|
k3s_server_args = var.k3s_server_args,
|
||||||
db_engine = var.db_engine,
|
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_name = var.db_name,
|
||||||
db_username = var.db_username,
|
db_username = var.db_username,
|
||||||
db_password = var.db_password,
|
db_password = var.db_password,
|
||||||
|
|
Loading…
Reference in New Issue