Fix bug 1298 47/10047/13
authorDavid Garcia <david.garcia@canonical.com>
Fri, 27 Nov 2020 14:32:02 +0000 (15:32 +0100)
committerDavid Garcia <david.garcia@canonical.com>
Sat, 28 Nov 2020 10:12:41 +0000 (11:12 +0100)
commitf6e9b00b6f7cd35e45ace4c84b53fe8d12b2438c
tree86711bb6ca5aaf63d032860441dc8f605e067a2d
parent1c83f2e4d061ad37ba898e114cb42e70fdee5145
Fix bug 1298

This bug was caused because a bad parsing of the kubeconfig.
The token should be the secret from k8s for the created service
account.

When adding a k8s cluster, a clusterrole, clusterrolebinding, and
serviceaccounts are created.

Tests are needed for oauth2 and userpass kubeconfigs.

Change-Id: I6a4a2834bd6477f255e8ca48e7f53cd3a0d3fddf
Signed-off-by: David Garcia <david.garcia@canonical.com>
n2vc/k8s_helm_base_conn.py
n2vc/k8s_juju_conn.py
n2vc/kubectl.py
n2vc/libjuju.py
n2vc/tests/unit/test_k8s_juju_conn.py
n2vc/tests/unit/test_kubectl.py
n2vc/tests/unit/test_libjuju.py