In case of test from inside the cluster, the k8s credentials must be retrieved
using the k8s python client method load_incluster_config
Issue-ID: INT-1818*
Signed-off-by: mrichomme <morgan.richomme@orange.com>
Change-Id: If3eb2de2099f88443ae4e36a404423b2e57769b8
# Kubernetes section
# retrieve the candidate ports first
-k8s_config = config.load_kube_config()
+if args.mode == "internal":
+ k8s_config = config.load_incluster_config()
+else:
+ k8s_config = config.load_kube_config()
core = client.CoreV1Api()
api_instance = client.ExtensionsV1beta1Api(