diff --git a/operator/app/src/main/java/org/keycloak/operator/controllers/KeycloakIngress.java b/operator/app/src/main/java/org/keycloak/operator/controllers/KeycloakIngress.java index 35a48d9073..a96f9349d8 100644 --- a/operator/app/src/main/java/org/keycloak/operator/controllers/KeycloakIngress.java +++ b/operator/app/src/main/java/org/keycloak/operator/controllers/KeycloakIngress.java @@ -67,6 +67,7 @@ public class KeycloakIngress extends OperatorManagedResource implements StatusUp .withName(getName()) .withNamespace(getNamespace()) .addToAnnotations("nginx.ingress.kubernetes.io/backend-protocol", backendProtocol) + .addToAnnotations("route.openshift.io/termination", "passthrough") .endMetadata() .withNewSpec() .withNewDefaultBackend() @@ -80,7 +81,7 @@ public class KeycloakIngress extends OperatorManagedResource implements StatusUp .addNewRule() .withNewHttp() .addNewPath() - .withPath("/") + .withPath("") .withPathType("ImplementationSpecific") .withNewBackend() .withNewService() diff --git a/operator/app/src/test/java/org/keycloak/operator/KeycloakIngressE2EIT.java b/operator/app/src/test/java/org/keycloak/operator/KeycloakIngressE2EIT.java index bc6793dee5..2bc2cc1705 100644 --- a/operator/app/src/test/java/org/keycloak/operator/KeycloakIngressE2EIT.java +++ b/operator/app/src/test/java/org/keycloak/operator/KeycloakIngressE2EIT.java @@ -141,6 +141,7 @@ public class KeycloakIngressE2EIT extends ClusterOperatorTest { var i = ingressSelector.get(); assertThat(i.getMetadata().getLabels().entrySet().containsAll(labels.entrySet())).isTrue(); // additional labels should not be overwritten assertEquals("HTTPS", i.getMetadata().getAnnotations().get("nginx.ingress.kubernetes.io/backend-protocol")); + assertEquals("passthrough", i.getMetadata().getAnnotations().get("route.openshift.io/termination")); assertEquals(Constants.KEYCLOAK_HTTPS_PORT, i.getSpec().getDefaultBackend().getService().getPort().getNumber()); });