|
23 | 23 | import oracle.weblogic.kubernetes.annotations.Namespaces;
|
24 | 24 | import oracle.weblogic.kubernetes.logging.LoggingFacade;
|
25 | 25 | import oracle.weblogic.kubernetes.utils.ExecCommand;
|
| 26 | +import oracle.weblogic.kubernetes.utils.ExecResult; |
26 | 27 | import org.junit.jupiter.api.AfterAll;
|
27 | 28 | import org.junit.jupiter.api.BeforeAll;
|
28 | 29 | import org.junit.jupiter.api.DisplayName;
|
|
38 | 39 | import static oracle.weblogic.kubernetes.TestConstants.ITLBTWODOMAINSNGINX_INGRESS_HTTP_NODEPORT;
|
39 | 40 | import static oracle.weblogic.kubernetes.TestConstants.K8S_NODEPORT_HOST;
|
40 | 41 | import static oracle.weblogic.kubernetes.TestConstants.KIND_CLUSTER;
|
| 42 | +import static oracle.weblogic.kubernetes.TestConstants.KUBERNETES_CLI; |
41 | 43 | import static oracle.weblogic.kubernetes.TestConstants.NGINX_CHART_VERSION;
|
42 | 44 | import static oracle.weblogic.kubernetes.TestConstants.OKE_CLUSTER;
|
43 | 45 | import static oracle.weblogic.kubernetes.TestConstants.SKIP_CLEANUP;
|
@@ -145,6 +147,16 @@ public static void initAll(@Namespaces(3) List<String> namespaces) {
|
145 | 147 | // install Nginx ingress controller for all test cases using Nginx
|
146 | 148 | installNginxIngressController();
|
147 | 149 |
|
| 150 | + String command = KUBERNETES_CLI + " get all --all-namespaces"; |
| 151 | + logger.info("curl command to get all --all-namespaces is: {0}", command); |
| 152 | + |
| 153 | + try { |
| 154 | + ExecResult result = ExecCommand.exec(command, true); |
| 155 | + logger.info("result is: {0}", result.toString()); |
| 156 | + } catch (java.io.IOException | InterruptedException ex) { |
| 157 | + ex.printStackTrace(); |
| 158 | + } |
| 159 | + |
148 | 160 | String ingressServiceName = nginxHelmParams.getHelmParams().getReleaseName() + "-ingress-nginx-controller";
|
149 | 161 | ingressIP = getServiceExtIPAddrtOke(ingressServiceName, nginxNamespace) != null
|
150 | 162 | ? getServiceExtIPAddrtOke(ingressServiceName, nginxNamespace) : formatIPv6Host(K8S_NODEPORT_HOST);
|
@@ -510,10 +522,15 @@ private static void installNginxIngressController() {
|
510 | 522 | }
|
511 | 523 |
|
512 | 524 | private static NginxParams installNginxLB() {
|
513 |
| - |
514 | 525 | getLogger().info("Installing NGINX in namespace {0}", nginxNamespace);
|
| 526 | + |
| 527 | + String nodePortValue = null; |
| 528 | + if (!OKE_CLUSTER) { |
| 529 | + nodePortValue = "NodePort"; |
| 530 | + } |
| 531 | + |
515 | 532 | NginxParams params = installAndVerifyNginx(nginxNamespace, ITLBTWODOMAINSNGINX_INGRESS_HTTP_NODEPORT,
|
516 |
| - ITLBTWODOMAINSNGINX_INGRESS_HTTPS_NODEPORT, NGINX_CHART_VERSION, "NodePort"); |
| 533 | + ITLBTWODOMAINSNGINX_INGRESS_HTTPS_NODEPORT, NGINX_CHART_VERSION, nodePortValue); |
517 | 534 |
|
518 | 535 | return params;
|
519 | 536 | }
|
|
0 commit comments