Commit d852d34a authored by Brad Davidson's avatar Brad Davidson Committed by Brad Davidson

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: 's avatarBrad Davidson <brad.davidson@rancher.com>
parent 69987096
......@@ -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() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment