aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/onaptests/steps/onboard/cps.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/onaptests/steps/onboard/cps.py b/src/onaptests/steps/onboard/cps.py
index 60e1990..f5820c7 100644
--- a/src/onaptests/steps/onboard/cps.py
+++ b/src/onaptests/steps/onboard/cps.py
@@ -261,7 +261,10 @@ class CheckPostgressDataBaseConnectionStep(CpsBaseStep):
return "Establish connection with Postgress and execute the query"
def get_database_credentials(self):
- config.load_kube_config()
+ if settings.IN_CLUSTER:
+ config.load_incluster_config()
+ else:
+ config.load_kube_config(config_file=settings.K8S_CONFIG)
api_instance = client.CoreV1Api()
try:
secret = api_instance.read_namespaced_secret(