diff --git a/app/server/controller/src/main/java/io/syndesis/server/controller/integration/camelk/customizer/ExposureCustomizer.java b/app/server/controller/src/main/java/io/syndesis/server/controller/integration/camelk/customizer/ExposureCustomizer.java index 5299da3dde7..7c5c509a3a2 100644 --- a/app/server/controller/src/main/java/io/syndesis/server/controller/integration/camelk/customizer/ExposureCustomizer.java +++ b/app/server/controller/src/main/java/io/syndesis/server/controller/integration/camelk/customizer/ExposureCustomizer.java @@ -19,6 +19,7 @@ import java.util.HashMap; import io.syndesis.common.model.integration.IntegrationDeployment; +import io.syndesis.server.controller.integration.camelk.crd.ConfigurationSpec; import io.syndesis.server.controller.integration.camelk.crd.Integration; import io.syndesis.server.controller.integration.camelk.crd.IntegrationSpec; import io.syndesis.server.controller.integration.camelk.crd.TraitSpec; @@ -47,6 +48,19 @@ public Integration customize(IntegrationDeployment deployment, Integration integ .putConfiguration("port", Integer.toString(OpenShiftService.INTEGRATION_SERVICE_PORT)) .build() ); + + spec.addConfiguration( + new ConfigurationSpec.Builder() + .type("property") + .value("customizer.servlet.enabled=true") + .build() + ); + spec.addConfiguration( + new ConfigurationSpec.Builder() + .type("property") + .value("customizer.servlet.bindPort=" +OpenShiftService.INTEGRATION_SERVICE_PORT) + .build() + ); } if (exposure.contains(Exposure.ROUTE)) { diff --git a/app/server/controller/src/test/java/io/syndesis/server/controller/integration/camelk/customizer/ExposureCustomizerTest.java b/app/server/controller/src/test/java/io/syndesis/server/controller/integration/camelk/customizer/ExposureCustomizerTest.java index 2fbe100805e..c6eb4de8008 100644 --- a/app/server/controller/src/test/java/io/syndesis/server/controller/integration/camelk/customizer/ExposureCustomizerTest.java +++ b/app/server/controller/src/test/java/io/syndesis/server/controller/integration/camelk/customizer/ExposureCustomizerTest.java @@ -16,6 +16,7 @@ package io.syndesis.server.controller.integration.camelk.customizer; import java.util.EnumSet; +import java.util.Objects; import io.syndesis.common.model.integration.Integration; import io.syndesis.common.model.integration.IntegrationDeployment; @@ -55,6 +56,17 @@ public void testExposureCustomizerWithServiceExposure() { entry("auto", "false"), entry("port", Integer.toString(OpenShiftService.INTEGRATION_SERVICE_PORT)) ); + + assertThat(i.getSpec().getConfiguration()) + .filteredOn("type", "property") + .anyMatch( + c -> Objects.equals(c.getValue(), "customizer.servlet.enabled=true") + ); + assertThat(i.getSpec().getConfiguration()) + .filteredOn("type", "property") + .anyMatch( + c -> Objects.equals(c.getValue(), "customizer.servlet.bindPort=" +OpenShiftService.INTEGRATION_SERVICE_PORT) + ); } @Test