Skip to content

Commit b30480b

Browse files
authored
backport for traefik helm chart changes (#4134)
* backport for traefik helm chart changes
1 parent 5aef0a8 commit b30480b

File tree

5 files changed

+15
-5
lines changed

5 files changed

+15
-5
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: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,8 @@ 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;
186186
public static final String TRAEFIK_INGRESS_IMAGE_TAG = "v2.9.6";
187187

188188
// Voyager constants

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

Lines changed: 9 additions & 2 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,11 +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;
24-
25+
private String traefikRegistry = TRAEFIK_INGRESS_IMAGE_REGISTRY;
2526
private static final String NODEPORTS_HTTP = "ports.web.nodePort";
2627
private static final String NODEPORTS_HTTPS = "ports.websecure.nodePort";
2728
private static final String TRAEFIK_IMAGE = "image.repository";
2829
private static final String TRAEFIK_IMAGE_TAG = "image.tag";
30+
private static final String TRAEFIK_IMAGE_REGISTRY = "image.registry";
2931

3032
public TraefikParams nodePortsHttp(int nodePortsHttp) {
3133
this.nodePortsHttp = nodePortsHttp;
@@ -46,6 +48,11 @@ public HelmParams getHelmParams() {
4648
return helmParams;
4749
}
4850

51+
public TraefikParams traefikRegistry(String traefikRegistry) {
52+
this.traefikRegistry = traefikRegistry;
53+
return this;
54+
}
55+
4956
public TraefikParams traefikImage(String traefikImage) {
5057
this.traefikImage = traefikImage;
5158
return this;
@@ -73,7 +80,7 @@ public Map<String, Object> getValues() {
7380

7481
values.put(TRAEFIK_IMAGE, traefikImage);
7582
values.put(TRAEFIK_IMAGE_TAG, traefikImageTag);
76-
83+
values.put(TRAEFIK_IMAGE_REGISTRY, traefikRegistry);
7784
values.values().removeIf(Objects::isNull);
7885
return values;
7986
}

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)