Skip to content

Commit

Permalink
Add easy support for single node sqlite with kine
Browse files Browse the repository at this point in the history
Signed-off-by: Vitor Savian <[email protected]>
  • Loading branch information
vitorsavian committed May 23, 2024
1 parent 3e0fb75 commit 2fc5a27
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions pkg/cli/cmds/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ var (
Usage: "(components) Enable rke2 default cloud controller manager's service controller",
EnvVar: "RKE2_ENABLE_SERVICELB",
},
&cli.BoolTFlag{
Name: "cluster-init",
Usage: "(cluster) Initialize a new cluster using embedded Etcd. (Default: true)",
EnvVar: "RKE2_CLUSTER_INIT",
},
}

k3sServerBase = mustCmdFromK3S(cmds.NewServerCommand(ServerRun), K3SFlagSet{
Expand Down
2 changes: 1 addition & 1 deletion pkg/rke2/rke2_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func initExecutor(clx *cli.Context, cfg Config, isServer bool) (*podexecutor.Sta
// Verify if the user want to use kine as the datastore
// and then remove the etcd from the static pod
ExternalDatabase := false
if cmds.ServerConfig.DatastoreEndpoint != "" {
if cmds.ServerConfig.DatastoreEndpoint != "" || clx.BoolT("cluster-init") == false {
cmds.ServerConfig.ClusterInit = false
cmds.ServerConfig.KineTLS = true
ExternalDatabase = true
Expand Down

0 comments on commit 2fc5a27

Please sign in to comment.