Fix ingress default http and https ports 08/109408/3
authorLucjan Bryndza <l.bryndza@samsung.com>
Mon, 22 Jun 2020 12:49:22 +0000 (14:49 +0200)
committerLucjan Bryndza <l.bryndza@samsung.com>
Wed, 1 Jul 2020 10:13:07 +0000 (12:13 +0200)
Change ingress http and https port in the ingress controller default port configuration.

Signed-off-by: Lucjan Bryndza <l.bryndza@samsung.com>
Issue-ID: OOM-2434
Change-Id: Ic354510006d9f2d5d56f377d8f628e55a1a4b869
Signed-off-by: Lucjan Bryndza <l.bryndza@samsung.com>
test/security/check_for_ingress_and_nodeports.py

index f357234..f3dc128 100755 (executable)
@@ -72,7 +72,7 @@ class ScanMode(Enum):
     def __str__(self):
         return self.name
 
-#Read the ingress controller http and https ports from the kubernetes config
+#Read the ingress controller http and https ports from the kubernetes cluster
 def find_ingress_ports(v1):
     svc = v1.list_namespaced_service(K8S_INGRESS_NS)
     http_port = 0
@@ -84,7 +84,9 @@ def find_ingress_ports(v1):
                     http_port = pinfo.node_port
                 elif pinfo and pinfo.name == 'https':
                     https_port = pinfo.node_port
-    return http_port,https_port
+
+            return http_port,https_port
+        else: return(80,443)
 
 # List all ingress devices
 def list_ingress(xv1b):