Thanks to visit codestin.com
Credit goes to github.com

Skip to content

load_config does not really support "kube_config_path" #2038

@Cornel-Craveta

Description

@Cornel-Craveta

If you try to call kubernetes.config.load_config with an argument kube_config_path -- which apparently should be possible, according to the first line of the method:

def load_config(**kwargs):
...
    if "kube_config_path" in kwargs.keys()...
       load_kube_config(**kwargs)

then the call would fail, because the method load_kube_config (on the next line) does not accept an argument kube_config_path.

def load_kube_config(config_file=None, context=None,
                     client_configuration=None,
                     persist_config=True,
                     temp_file_path=None):

See:

https://github.com/kubernetes-client/python/blob/master/kubernetes/base/config/__init__.py#L36
https://github.com/kubernetes-client/python/blob/master/kubernetes/base/config/kube_config.py#L793

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.lifecycle/rottenDenotes an issue or PR that has aged beyond stale and will be auto-closed.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions