Skip to content

Commit 0140fee

Browse files
authored
updated traefik install due helm chart values change (#4131)
* updated traefik install due helm chart values change
1 parent 8cd0b89 commit 0140fee

File tree

5 files changed

+16
-3
lines changed

5 files changed

+16
-3
lines changed

integration-tests/src/test/java/oracle/weblogic/kubernetes/ItWlsSamples.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
import static oracle.weblogic.kubernetes.TestConstants.TEST_IMAGES_REPO_SECRET_NAME;
5555
import static oracle.weblogic.kubernetes.TestConstants.TEST_NGINX_IMAGE_NAME;
5656
import static oracle.weblogic.kubernetes.TestConstants.TRAEFIK_INGRESS_IMAGE_NAME;
57+
import static oracle.weblogic.kubernetes.TestConstants.TRAEFIK_INGRESS_IMAGE_REGISTRY;
5758
import static oracle.weblogic.kubernetes.TestConstants.TRAEFIK_INGRESS_IMAGE_TAG;
5859
import static oracle.weblogic.kubernetes.TestConstants.WEBLOGIC_IMAGE_TAG;
5960
import static oracle.weblogic.kubernetes.TestConstants.WEBLOGIC_IMAGE_TAG_DEFAULT;
@@ -428,6 +429,7 @@ void testTraefikIngressController() {
428429
setupSample(testSamplePath);
429430
Map<String, String> templateMap = new HashMap<>();
430431
templateMap.put("TRAEFIK_INGRESS_IMAGE_NAME", TRAEFIK_INGRESS_IMAGE_NAME);
432+
templateMap.put("TRAEFIK_INGRESS_IMAGE_REGISTRY", TRAEFIK_INGRESS_IMAGE_REGISTRY);
431433
Path srcPropFile = Paths.get(RESOURCE_DIR, "traefik.template.properties");
432434
Path targetPropFile = assertDoesNotThrow(
433435
() -> generateFileFromTemplate(srcPropFile.toString(), "traefik.properties", templateMap));

integration-tests/src/test/java/oracle/weblogic/kubernetes/TestConstants.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,9 @@ public interface TestConstants {
181181
public static final String TRAEFIK_RELEASE_NAME = "traefik-release" + BUILD_ID;
182182
public static final String TRAEFIK_REPO_NAME = "traefik";
183183
public static final String TRAEFIK_CHART_NAME = "traefik";
184-
public static final String TRAEFIK_INGRESS_IMAGE_NAME = TEST_IMAGES_REPO
185-
+ "/weblogick8s/test-images/traefik-ingress/traefik";
184+
public static final String TRAEFIK_INGRESS_IMAGE_NAME = "weblogick8s/test-images/traefik-ingress/traefik";
185+
public static final String TRAEFIK_INGRESS_IMAGE_REGISTRY = TEST_IMAGES_REPO;
186+
186187
public static final String TRAEFIK_INGRESS_IMAGE_TAG = "v2.9.6";
187188

188189
// Voyager constants

integration-tests/src/test/java/oracle/weblogic/kubernetes/actions/impl/TraefikParams.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import oracle.weblogic.kubernetes.actions.impl.primitive.HelmParams;
1111

1212
import static oracle.weblogic.kubernetes.TestConstants.TRAEFIK_INGRESS_IMAGE_NAME;
13+
import static oracle.weblogic.kubernetes.TestConstants.TRAEFIK_INGRESS_IMAGE_REGISTRY;
1314
import static oracle.weblogic.kubernetes.TestConstants.TRAEFIK_INGRESS_IMAGE_TAG;
1415

1516
// All parameters needed to install Traefik Operator
@@ -21,10 +22,12 @@ public class TraefikParams {
2122
private HelmParams helmParams;
2223
private String traefikImage = TRAEFIK_INGRESS_IMAGE_NAME;
2324
private String traefikImageTag = TRAEFIK_INGRESS_IMAGE_TAG;
25+
private String traefikRegistry = TRAEFIK_INGRESS_IMAGE_REGISTRY;
2426

2527
private static final String NODEPORTS_HTTP = "ports.web.nodePort";
2628
private static final String NODEPORTS_HTTPS = "ports.websecure.nodePort";
2729
private static final String TRAEFIK_IMAGE = "image.repository";
30+
private static final String TRAEFIK_IMAGE_REGISTRY = "image.registry";
2831
private static final String TRAEFIK_IMAGE_TAG = "image.tag";
2932

3033
public TraefikParams nodePortsHttp(int nodePortsHttp) {
@@ -51,6 +54,11 @@ public TraefikParams traefikImage(String traefikImage) {
5154
return this;
5255
}
5356

57+
public TraefikParams traefikRegistry(String traefikRegistry) {
58+
this.traefikRegistry = traefikRegistry;
59+
return this;
60+
}
61+
5462
public TraefikParams traefikImageTag(String traefikImageTag) {
5563
this.traefikImageTag = traefikImageTag;
5664
return this;
@@ -72,6 +80,7 @@ public Map<String, Object> getValues() {
7280
}
7381

7482
values.put(TRAEFIK_IMAGE, traefikImage);
83+
values.put(TRAEFIK_IMAGE_REGISTRY, traefikRegistry);
7584
values.put(TRAEFIK_IMAGE_TAG, traefikImageTag);
7685

7786
values.values().removeIf(Objects::isNull);

integration-tests/src/test/java/oracle/weblogic/kubernetes/utils/CommonLBTestUtils.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -444,6 +444,7 @@ private static boolean adminNodePortAccessible(int nodePort)
444444
for (int i = 1; i <= 10; i++) {
445445
getLogger().info("Iteration {0} out of 10: Accessing WebLogic console with url {1}", i, consoleUrl);
446446
final WebClient webClient = new WebClient();
447+
webClient.getOptions().setThrowExceptionOnFailingStatusCode(false);
447448
final HtmlPage loginPage = assertDoesNotThrow(() -> webClient.getPage(consoleUrl),
448449
"connection to the WebLogic admin console failed");
449450
HtmlForm form = loginPage.getFormByName("loginData");
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
--set image.repository=TRAEFIK_INGRESS_IMAGE_NAME
1+
--set image.repository=TRAEFIK_INGRESS_IMAGE_NAME --set image.registry=TRAEFIK_INGRESS_IMAGE_REGISTRY

0 commit comments

Comments
 (0)