mirror of
https://github.com/k3s-io/k3s.git
synced 2024-06-07 19:41:36 +00:00
Merge pull request #2160 from brandond/dqlite_args
Remove lingering references to dqlite
This commit is contained in:
commit
9687d814d7
@ -1,7 +0,0 @@
|
||||
// +build dqlite
|
||||
|
||||
package cmds
|
||||
|
||||
const (
|
||||
hideDqlite = false
|
||||
)
|
7
pkg/cli/cmds/etcd.go
Normal file
7
pkg/cli/cmds/etcd.go
Normal file
@ -0,0 +1,7 @@
|
||||
// +build !no_etcd
|
||||
|
||||
package cmds
|
||||
|
||||
const (
|
||||
hideClusterFlags = false
|
||||
)
|
@ -1,7 +1,7 @@
|
||||
// +build !dqlite
|
||||
// +build no_etcd
|
||||
|
||||
package cmds
|
||||
|
||||
const (
|
||||
hideDqlite = true
|
||||
hideClusterFlags = true
|
||||
)
|
||||
|
@ -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,
|
||||
},
|
||||
|
@ -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"
|
||||
|
@ -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 -
|
||||
|
@ -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…
Reference in New Issue
Block a user