Skip to content
This repository was archived by the owner on Jan 19, 2018. It is now read-only.
This repository was archived by the owner on Jan 19, 2018. It is now read-only.

atomicapp errors on missing user for k8s configuration #771

@cdrage

Description

@cdrage

If supplied with this:

apiVersion: v1
clusters:
- cluster:
    server: http://localhost:8080
  name: dev
contexts:
- context:
    cluster: dev
    user: ""
  name: dev
current-context: dev
kind: Config
preferences: {}
users: []

With a blank user, atomicapp errors out:


Traceback (most recent call last):

  File "/opt/atomicapp/atomicapp/cli/main.py", line 130, in cli_func_exec

    cli_func(cli_func_args)

  File "/opt/atomicapp/atomicapp/cli/main.py", line 84, in cli_run

    nm.run(**argdict)

  File "/opt/atomicapp/atomicapp/nulecule/main.py", line 322, in run

    self.nulecule.run(cli_provider, dryrun)

  File "/opt/atomicapp/atomicapp/nulecule/base.py", line 205, in run

    component.run(provider_key, dryrun)

  File "/opt/atomicapp/atomicapp/nulecule/base.py", line 339, in run

    provider.init()

  File "/opt/atomicapp/atomicapp/providers/kubernetes.py", line 107, in init

    self.api = Client(KubeConfig.from_file(default_config_loc), "kubernetes")

  File "/opt/atomicapp/atomicapp/providers/lib/kubeshift/client.py", line 42, in __init__

    self.connection = KubeKubernetesClient(config)

  File "/opt/atomicapp/atomicapp/providers/lib/kubeshift/kubernetes.py", line 43, in __init__

    self.api = KubeBase(config)

  File "/opt/atomicapp/atomicapp/providers/lib/kubeshift/kubebase.py", line 83, in __init__

    self.user = self._users()[kubeconfig_user]

KeyError: u''

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