aboutsummaryrefslogtreecommitdiffstats
path: root/test/security/check_certificates
diff options
context:
space:
mode:
authormrichomme <morgan.richomme@orange.com>2021-01-04 17:55:10 +0100
committermrichomme <morgan.richomme@orange.com>2021-01-04 17:55:10 +0100
commitb7da6ad93bcce4218004971050a06c29288ad506 (patch)
tree7f52e9866b806173dacdd1538ea9f667b98e718a /test/security/check_certificates
parent23f272cba8221de8e51840dba8a16f678d3ce5cb (diff)
Adapt kube config retrieval for certificate check
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
Diffstat (limited to 'test/security/check_certificates')
-rw-r--r--test/security/check_certificates/check_certificates/check_certificates_validity.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/security/check_certificates/check_certificates/check_certificates_validity.py b/test/security/check_certificates/check_certificates/check_certificates_validity.py
index 87a2fa932..948783d8f 100644
--- a/test/security/check_certificates/check_certificates/check_certificates_validity.py
+++ b/test/security/check_certificates/check_certificates/check_certificates_validity.py
@@ -123,7 +123,10 @@ if args.mode == "nodeport":
# 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(