Skip to content

Commit

Permalink
Sync kine changes from k3s-io/kine#325
Browse files Browse the repository at this point in the history
Signed-off-by: Brad Davidson <[email protected]>
  • Loading branch information
brandond committed Oct 11, 2024
1 parent 4ff7f30 commit ca9fffa
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions pkg/rke2/rke2_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
"github.com/k3s-io/k3s/pkg/cli/cmds"
"github.com/k3s-io/k3s/pkg/cluster/managed"
"github.com/k3s-io/k3s/pkg/etcd"
"github.com/k3s-io/kine/pkg/endpoint"
"github.com/k3s-io/kine/pkg/util"
"github.com/pkg/errors"
"github.com/rancher/rke2/pkg/cli/defaults"
"github.com/rancher/rke2/pkg/images"
Expand Down Expand Up @@ -67,8 +67,10 @@ func initExecutor(clx *cli.Context, cfg Config, isServer bool) (*podexecutor.Sta

// When the datastore sets a etcd endpoint, rke2 does not need kine with tls and changes
// in the --etcd-servers inside podexecutor using ExternalDatabase
driver, _ := endpoint.ParseStorageEndpoint(cmds.ServerConfig.DatastoreEndpoint)
if !(driver == endpoint.ETCDBackend) {
scheme, _ := util.SchemeAndAddress(cmds.ServerConfig.DatastoreEndpoint)
switch scheme {
case "http", "https":
default:
cmds.ServerConfig.KineTLS = true
ExternalDatabase = true
}
Expand Down

0 comments on commit ca9fffa

Please sign in to comment.