mirror of
https://github.com/k3s-io/k3s.git
synced 2024-06-07 19:41:36 +00:00
Remove dead EndpointName code
According to @galal-hussein this is dead code that was probably brought over from Kine. I certainly couldn't figure out what it is supposed to be doing. Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
This commit is contained in:
parent
97eb28a01a
commit
8025da5a8d
@ -58,12 +58,6 @@ func (c *Cluster) initClusterDB(ctx context.Context, handler http.Handler) (http
|
||||
return handler, nil
|
||||
}
|
||||
|
||||
if !strings.HasPrefix(c.config.Datastore.Endpoint, c.managedDB.EndpointName()+"://") {
|
||||
c.config.Datastore = endpoint.Config{
|
||||
Endpoint: c.managedDB.EndpointName(),
|
||||
}
|
||||
}
|
||||
|
||||
return c.managedDB.Register(ctx, c.config, handler)
|
||||
}
|
||||
|
||||
@ -77,13 +71,6 @@ func (c *Cluster) assignManagedDriver(ctx context.Context) error {
|
||||
}
|
||||
}
|
||||
|
||||
endpointType := strings.SplitN(c.config.Datastore.Endpoint, ":", 2)[0]
|
||||
for _, driver := range managed.Registered() {
|
||||
if endpointType == driver.EndpointName() {
|
||||
c.managedDB = driver
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
if c.config.Datastore.Endpoint == "" && (c.config.ClusterInit || (c.config.Token != "" && c.config.JoinURL != "")) {
|
||||
for _, driver := range managed.Registered() {
|
||||
|
Loading…
Reference in New Issue
Block a user