Skip to content

loadFromDefault fails if the KUBECONFIG env variable ends with path delimiter. #627

@sweko

Description

@sweko

Describe the bug
calling loadFromDefault fails if the KUBECONFIG env variable ends with path delimiter.

** Client Version **
0.14.1

** Server Version **
N/A

To Reproduce
Set the KUBECONFIG env variable so that the last character is the path delimiter ; on Windows, : on Linux
export KUBECONFIG=$KUBECONFIG:
Run the examples

Expected behavior
loadFromDefault should load the configuration from the files, ignoring empty entries in KUBECONFIG .

** Example Code**
In console:

export KUBECONFIG=$KUBECONFIG:

In code:

const kc = new k8s.KubeConfig();
kc.loadFromDefault()

Environment (please complete the following information):

  • OS: Windows and Linux (WSL Ubuntu)
  • NodeJS Version N/A
  • Cloud runtime N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions