Skip to content

Doesn't handle multipule kube-config files #3

@switchboardOp

Description

@switchboardOp

I work with more than one cluster, so I set the KUBECONFIG environment variable to list of paths to configuration files as described here.

This causes doctor to panic.

panic: stat /Users/me/.kube/config:/Users/me/.kube/mini-kube-config:/Users/me/.kube/dev-kube-config:/Users/me/.kube/prod-kube-config: no such file or directory

goroutine 1 [running]:
github.com/emirozer/kubectl-doctor/pkg/client.tryGetKubeConfigFromEnvVar(0x50, 0xc0002c4e60, 0x1ebccc0)
	/Users/eoz/go/src/github.com/emirozer/kubectl-doctor/pkg/client/client.go:66 +0x14d
github.com/emirozer/kubectl-doctor/pkg/client.InitClient(0xc0000b00c0)
	/Users/eoz/go/src/github.com/emirozer/kubectl-doctor/pkg/client/client.go:32 +0x34
github.com/emirozer/kubectl-doctor/pkg/plugin.init.0()
	/Users/eoz/go/src/github.com/emirozer/kubectl-doctor/pkg/plugin/cmd.go:45 +0x97

doctor should respect the merged config and the current context.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions