Modify Python ONAP SDK tests to not require kubeconfig
[testsuite/pythonsdk-tests.git] / src / onaptests / steps / onboard / cds.py
index ad40fe5..5256eac 100644 (file)
@@ -34,7 +34,10 @@ class ExposeCDSBlueprintprocessorNodePortStep(CDSBaseStep):
         """Initialize step."""
         super().__init__(cleanup=cleanup)
         self.service_name: str = "cds-blueprints-processor-http"
-        config.load_kube_config(settings.K8S_CONFIG)
+        if settings.IN_CLUSTER:
+            config.load_incluster_config()
+        else:
+            config.load_kube_config(config_file=settings.K8S_CONFIG)
         self.k8s_client: client.CoreV1Api = client.CoreV1Api()
 
     @property