Skip to content

Commit 4384947

Browse files
committed
k8s: fix missing kubeconfig check from endpoint
Signed-off-by: CrazyMax <[email protected]>
1 parent 6942118 commit 4384947

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

builder/node.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,12 @@ func (b *Builder) LoadNodes(ctx context.Context, withData bool) (_ []Node, err e
8282
contextStore := b.opts.dockerCli.ContextStore()
8383

8484
var kcc driver.KubeClientConfig
85-
kcc, err = ctxkube.ConfigFromContext(n.Endpoint, contextStore)
85+
kcc, err = ctxkube.ConfigFromEndpoint(n.Endpoint, contextStore)
8686
if err != nil {
8787
// err is returned if n.Endpoint is non-context name like "unix:///var/run/docker.sock".
8888
// try again with name="default".
8989
// FIXME(@AkihiroSuda): n should retain real context name.
90-
kcc, err = ctxkube.ConfigFromContext("default", contextStore)
90+
kcc, err = ctxkube.ConfigFromEndpoint("default", contextStore)
9191
if err != nil {
9292
logrus.Error(err)
9393
}

0 commit comments

Comments
 (0)