This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch man in repository https://gitbox.apache.org/repos/asf/camel.git
commit c4aeba686c12e98dac962239669dffa1684e00aa Author: Claus Ibsen <[email protected]> AuthorDate: Tue Jul 29 16:20:29 2025 +0200 CAMEL-22285: platform-http-main - Dev consoles should be registered as management endpoints --- .../main/camel-main-configuration-metadata.json | 17 ++------ .../src/main/docs/micrometer-prometheus.adoc | 6 +-- .../prometheus/MicrometerPrometheus.java | 45 ++++++---------------- .../ROOT/pages/camel-4x-upgrade-guide-4_14.adoc | 7 ++++ .../java/org/apache/camel/main/KameletMain.java | 32 +++++++-------- 5 files changed, 42 insertions(+), 65 deletions(-) diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/main/camel-main-configuration-metadata.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/main/camel-main-configuration-metadata.json index d28e97682aa..66eff52bf6b 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/main/camel-main-configuration-metadata.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/main/camel-main-configuration-metadata.json @@ -195,6 +195,7 @@ { "name": "camel.management.authenticationPath", "description": "Set HTTP url path of embedded server that is protected by authentication configuration.", "sourceType": "org.apache.camel.main.HttpManagementServerConfigurationProperties", "type": "string", "javaType": "java.lang.String" }, { "name": "camel.management.basicPropertiesFile", "description": "Name of the file that contains basic authentication info for Vert.x file auth provider.", "sourceType": "org.apache.camel.main.HttpManagementServerConfigurationProperties", "type": "string", "javaType": "java.lang.String" }, { "name": "camel.management.devConsoleEnabled", "description": "Whether to enable developer console (not intended for production use). Dev console must also be enabled on CamelContext. For example by setting camel.context.dev-console=true in application.properties, or via code camelContext.setDevConsole(true); If enabled then you can access a basic developer console on context-path: \/q\/dev.", "sourceType": "org.apache.camel.main.HttpManagementServerConfigurationProperties", "type": [...] + { "name": "camel.management.downloadEnabled", "description": "Whether to enable file download via HTTP. This makes it possible to browse and download resource source files such as Camel XML or YAML routes. Only enable this for development, troubleshooting or special situations for management and monitoring.", "sourceType": "org.apache.camel.main.HttpManagementServerConfigurationProperties", "type": "boolean", "javaType": "boolean", "defaultValue": "false" }, { "name": "camel.management.enabled", "description": "Whether embedded HTTP server is enabled. By default, the server is not enabled.", "sourceType": "org.apache.camel.main.HttpManagementServerConfigurationProperties", "type": "boolean", "javaType": "boolean", "defaultValue": "false" }, { "name": "camel.management.healthCheckEnabled", "description": "Whether to enable health-check console. If enabled then you can access health-check status on context-path: \/q\/health (default)", "sourceType": "org.apache.camel.main.HttpManagementServerConfigurationProperties", "type": "boolean", "javaType": "boolean", "defaultValue": "false" }, { "name": "camel.management.healthPath", "description": "The path endpoint used to expose the health status", "sourceType": "org.apache.camel.main.HttpManagementServerConfigurationProperties", "type": "string", "javaType": "java.lang.String", "defaultValue": "\/observe\/health" }, @@ -205,11 +206,12 @@ { "name": "camel.management.jwtKeystorePassword", "description": "Password from the keystore used for JWT tokens validation.", "sourceType": "org.apache.camel.main.HttpManagementServerConfigurationProperties", "type": "string", "javaType": "java.lang.String" }, { "name": "camel.management.jwtKeystorePath", "description": "Path to the keystore file used for JWT tokens validation.", "sourceType": "org.apache.camel.main.HttpManagementServerConfigurationProperties", "type": "string", "javaType": "java.lang.String" }, { "name": "camel.management.jwtKeystoreType", "description": "Type of the keystore used for JWT tokens validation (jks, pkcs12, etc.).", "sourceType": "org.apache.camel.main.HttpManagementServerConfigurationProperties", "type": "string", "javaType": "java.lang.String" }, - { "name": "camel.management.maxBodySize", "description": "Maximum HTTP body size the embedded HTTP server can accept.", "sourceType": "org.apache.camel.main.HttpManagementServerConfigurationProperties", "type": "integer", "javaType": "java.lang.Long" }, { "name": "camel.management.metricsEnabled", "description": "Whether to enable metrics. If enabled then you can access metrics on context-path: \/q\/metrics (default)", "sourceType": "org.apache.camel.main.HttpManagementServerConfigurationProperties", "type": "boolean", "javaType": "boolean", "defaultValue": "false" }, { "name": "camel.management.path", "description": "Context-path to use for embedded HTTP server", "sourceType": "org.apache.camel.main.HttpManagementServerConfigurationProperties", "type": "string", "javaType": "java.lang.String", "defaultValue": "\/" }, - { "name": "camel.management.port", "description": "Port to use for binding embedded HTTP server", "sourceType": "org.apache.camel.main.HttpManagementServerConfigurationProperties", "type": "integer", "javaType": "int", "defaultValue": 9876 }, + { "name": "camel.management.port", "description": "Port to use for binding embedded HTTP server", "sourceType": "org.apache.camel.main.HttpManagementServerConfigurationProperties", "type": "integer", "javaType": "int", "defaultValue": 8080 }, { "name": "camel.management.sendEnabled", "description": "Whether to enable sending messages to Camel via HTTP. This makes it possible to use Camel to send messages to Camel endpoint URIs via HTTP.", "sourceType": "org.apache.camel.main.HttpManagementServerConfigurationProperties", "type": "boolean", "javaType": "boolean", "defaultValue": "false" }, + { "name": "camel.management.uploadEnabled", "description": "Whether to enable file upload via HTTP (not intended for production use). This functionality is for development to be able to reload Camel routes and code with source changes (if reload is enabled). If enabled then you can upload\/delete files via HTTP PUT\/DELETE on context-path: \/q\/upload\/{name}. You must also configure the uploadSourceDir option.", "sourceType": "org.apache.camel.main.HttpManagementServerConfigurationP [...] + { "name": "camel.management.uploadSourceDir", "description": "Source directory when upload is enabled.", "sourceType": "org.apache.camel.main.HttpManagementServerConfigurationProperties", "type": "string", "javaType": "java.lang.String" }, { "name": "camel.management.useGlobalSslContextParameters", "description": "Whether to use global SSL configuration for securing the embedded HTTP server.", "sourceType": "org.apache.camel.main.HttpManagementServerConfigurationProperties", "type": "boolean", "javaType": "boolean", "defaultValue": "false" }, { "name": "camel.metrics.baseEndpointURIExchangeEventNotifier", "description": "Whether to use static or dynamic values for Endpoint Name tags in captured metrics. By default, static values are used. When using dynamic tags, then a dynamic to (toD) can compute many different endpoint URIs that, can lead to many tags as the URI is dynamic, so use this with care if setting this option to false.", "sourceType": "org.apache.camel.main.MetricsConfigurationProperties", "type": "boolean", " [...] { "name": "camel.metrics.binders", "description": "Additional Micrometer binders to include such as jvm-memory, processor, jvm-thread, and so forth. Multiple binders can be separated by comma. The following binders currently is available from Micrometer: class-loader, commons-object-pool2, file-descriptor, hystrix-metrics-binder, jvm-compilation, jvm-gc, jvm-heap-pressure, jvm-info, jvm-memory, jvm-thread, log4j2, logback, processor, uptime", "sourceType": "org.apache.camel.main.Metr [...] @@ -301,30 +303,19 @@ { "name": "camel.server.authenticationEnabled", "description": "Whether to enable HTTP authentication for embedded server (for standalone applications; not Spring Boot or Quarkus).", "sourceType": "org.apache.camel.main.HttpServerConfigurationProperties", "type": "boolean", "javaType": "boolean", "defaultValue": "false" }, { "name": "camel.server.authenticationPath", "description": "Set HTTP url path of embedded server that is protected by authentication configuration.", "sourceType": "org.apache.camel.main.HttpServerConfigurationProperties", "type": "string", "javaType": "java.lang.String" }, { "name": "camel.server.basicPropertiesFile", "description": "Name of the file that contains basic authentication info for Vert.x file auth provider.", "sourceType": "org.apache.camel.main.HttpServerConfigurationProperties", "type": "string", "javaType": "java.lang.String" }, - { "name": "camel.server.devConsoleEnabled", "description": "Whether to enable developer console (not intended for production use). Dev console must also be enabled on CamelContext. For example by setting camel.context.dev-console=true in application.properties, or via code camelContext.setDevConsole(true); If enabled then you can access a basic developer console on context-path: \/q\/dev. Deprecated since 4.12.0, use HTTP management server instead.", "sourceType": "org.apache.camel.m [...] - { "name": "camel.server.downloadEnabled", "description": "Whether to enable file download via HTTP. This makes it possible to browse and download resource source files such as Camel XML or YAML routes. Only enable this for development, troubleshooting or special situations for management and monitoring.", "sourceType": "org.apache.camel.main.HttpServerConfigurationProperties", "type": "boolean", "javaType": "boolean", "defaultValue": "false" }, { "name": "camel.server.enabled", "description": "Whether embedded HTTP server is enabled. By default, the server is not enabled.", "sourceType": "org.apache.camel.main.HttpServerConfigurationProperties", "type": "boolean", "javaType": "boolean", "defaultValue": "false" }, { "name": "camel.server.fileUploadDirectory", "description": "Directory to temporary store file uploads while Camel routes the incoming request. If no directory has been explicit configured, then a temporary directory is created in the java.io.tmpdir directory.", "sourceType": "org.apache.camel.main.HttpServerConfigurationProperties", "type": "string", "javaType": "java.lang.String" }, { "name": "camel.server.fileUploadEnabled", "description": "Whether to enable file uploads being supported (such as POST multipart\/form-data) and stored into a temporary directory.", "sourceType": "org.apache.camel.main.HttpServerConfigurationProperties", "type": "boolean", "javaType": "boolean", "defaultValue": true }, - { "name": "camel.server.healthCheckEnabled", "description": "Whether to enable health-check console. If enabled then you can access health-check status on context-path: \/q\/health (default). Deprecated since 4.12.0, use HTTP management server instead.", "sourceType": "org.apache.camel.main.HttpServerConfigurationProperties", "type": "boolean", "javaType": "boolean", "defaultValue": "false" }, - { "name": "camel.server.healthPath", "description": "The path endpoint used to expose the health status. Deprecated since 4.12.0, use HTTP management server instead.", "sourceType": "org.apache.camel.main.HttpServerConfigurationProperties", "type": "string", "javaType": "java.lang.String", "defaultValue": "\/q\/health" }, { "name": "camel.server.host", "description": "Hostname to use for binding embedded HTTP server", "sourceType": "org.apache.camel.main.HttpServerConfigurationProperties", "type": "string", "javaType": "java.lang.String", "defaultValue": "0.0.0.0" }, - { "name": "camel.server.infoEnabled", "description": "Whether to enable info console. If enabled then you can see some basic Camel information at \/q\/info. Deprecated since 4.12.0, use HTTP management server instead.", "sourceType": "org.apache.camel.main.HttpServerConfigurationProperties", "type": "boolean", "javaType": "boolean", "defaultValue": "false" }, - { "name": "camel.server.jolokiaEnabled", "description": "Whether to enable jolokia. If enabled then you can access jolokia api on context-path: \/q\/jolokia. Deprecated since 4.12.0, use HTTP management server instead.", "sourceType": "org.apache.camel.main.HttpServerConfigurationProperties", "type": "boolean", "javaType": "boolean", "defaultValue": "false" }, - { "name": "camel.server.jolokiaPath", "description": "The path endpoint used to expose the jolokia data. Deprecated since 4.12.0, use HTTP management server instead.", "sourceType": "org.apache.camel.main.HttpServerConfigurationProperties", "type": "string", "javaType": "java.lang.String", "defaultValue": "\/q\/jolokia" }, { "name": "camel.server.jwtKeystorePassword", "description": "Password from the keystore used for JWT tokens validation.", "sourceType": "org.apache.camel.main.HttpServerConfigurationProperties", "type": "string", "javaType": "java.lang.String" }, { "name": "camel.server.jwtKeystorePath", "description": "Path to the keystore file used for JWT tokens validation.", "sourceType": "org.apache.camel.main.HttpServerConfigurationProperties", "type": "string", "javaType": "java.lang.String" }, { "name": "camel.server.jwtKeystoreType", "description": "Type of the keystore used for JWT tokens validation (jks, pkcs12, etc.).", "sourceType": "org.apache.camel.main.HttpServerConfigurationProperties", "type": "string", "javaType": "java.lang.String" }, { "name": "camel.server.maxBodySize", "description": "Maximum HTTP body size the embedded HTTP server can accept.", "sourceType": "org.apache.camel.main.HttpServerConfigurationProperties", "type": "integer", "javaType": "java.lang.Long" }, - { "name": "camel.server.metricsEnabled", "description": "Whether to enable metrics. If enabled then you can access metrics on context-path: \/q\/metrics (default). Deprecated since 4.12.0, use HTTP management server instead.", "sourceType": "org.apache.camel.main.HttpServerConfigurationProperties", "type": "boolean", "javaType": "boolean", "defaultValue": "false" }, { "name": "camel.server.path", "description": "Context-path to use for embedded HTTP server", "sourceType": "org.apache.camel.main.HttpServerConfigurationProperties", "type": "string", "javaType": "java.lang.String", "defaultValue": "\/" }, { "name": "camel.server.port", "description": "Port to use for binding embedded HTTP server", "sourceType": "org.apache.camel.main.HttpServerConfigurationProperties", "type": "integer", "javaType": "int", "defaultValue": 8080 }, - { "name": "camel.server.sendEnabled", "description": "Whether to enable sending messages to Camel via HTTP. This makes it possible to use Camel to send messages to Camel endpoint URIs via HTTP.", "sourceType": "org.apache.camel.main.HttpServerConfigurationProperties", "type": "boolean", "javaType": "boolean", "defaultValue": "false" }, { "name": "camel.server.staticContextPath", "description": "The context-path to use for serving static content. By default, the root path is used. And if there is an index.html page then this is automatically loaded.", "sourceType": "org.apache.camel.main.HttpServerConfigurationProperties", "type": "string", "javaType": "java.lang.String", "defaultValue": "\/" }, { "name": "camel.server.staticEnabled", "description": "Whether serving static files is enabled. If enabled then Camel can host html\/js and other web files that makes it possible to include small web applications.", "sourceType": "org.apache.camel.main.HttpServerConfigurationProperties", "type": "boolean", "javaType": "boolean", "defaultValue": "false" }, { "name": "camel.server.staticSourceDir", "description": "Additional directory that holds static content when static is enabled.", "sourceType": "org.apache.camel.main.HttpServerConfigurationProperties", "type": "string", "javaType": "java.lang.String" }, - { "name": "camel.server.uploadEnabled", "description": "Whether to enable file upload via HTTP (not intended for production use). This functionality is for development to be able to reload Camel routes and code with source changes (if reload is enabled). If enabled then you can upload\/delete files via HTTP PUT\/DELETE on context-path: \/q\/upload\/{name}. You must also configure the uploadSourceDir option.", "sourceType": "org.apache.camel.main.HttpServerConfigurationProperties", "t [...] - { "name": "camel.server.uploadSourceDir", "description": "Source directory when upload is enabled.", "sourceType": "org.apache.camel.main.HttpServerConfigurationProperties", "type": "string", "javaType": "java.lang.String" }, { "name": "camel.server.useGlobalSslContextParameters", "description": "Whether to use global SSL configuration for securing the embedded HTTP server.", "sourceType": "org.apache.camel.main.HttpServerConfigurationProperties", "type": "boolean", "javaType": "boolean", "defaultValue": "false" }, { "name": "camel.ssl.certAlias", "description": "An optional certificate alias to use. This is useful when the keystore has multiple certificates.", "sourceType": "org.apache.camel.main.SSLConfigurationProperties", "type": "string", "javaType": "java.lang.String" }, { "name": "camel.ssl.cipherSuites", "description": "List of TLS\/SSL cipher suite algorithm names. Multiple names can be separated by comma.", "sourceType": "org.apache.camel.main.SSLConfigurationProperties", "type": "string", "javaType": "java.lang.String" }, diff --git a/components/camel-micrometer-prometheus/src/main/docs/micrometer-prometheus.adoc b/components/camel-micrometer-prometheus/src/main/docs/micrometer-prometheus.adoc index 4ff9eea7f5b..eff9d29f96e 100644 --- a/components/camel-micrometer-prometheus/src/main/docs/micrometer-prometheus.adoc +++ b/components/camel-micrometer-prometheus/src/main/docs/micrometer-prometheus.adoc @@ -21,9 +21,9 @@ and turn on metrics in `application.properties` such as: [source,properties] ---- -# enable HTTP server with metrics -camel.server.enabled=true -camel.server.metricsEnabled=true +# enable management server with metrics +camel.management.enabled=true +camel.management.metricsEnabled=true # turn on micrometer metrics camel.metrics.enabled=true diff --git a/components/camel-micrometer-prometheus/src/main/java/org/apache/camel/component/micrometer/prometheus/MicrometerPrometheus.java b/components/camel-micrometer-prometheus/src/main/java/org/apache/camel/component/micrometer/prometheus/MicrometerPrometheus.java index adac6691298..c50402fd22a 100644 --- a/components/camel-micrometer-prometheus/src/main/java/org/apache/camel/component/micrometer/prometheus/MicrometerPrometheus.java +++ b/components/camel-micrometer-prometheus/src/main/java/org/apache/camel/component/micrometer/prometheus/MicrometerPrometheus.java @@ -50,7 +50,6 @@ import org.apache.camel.component.micrometer.routepolicy.MicrometerRoutePolicyFa import org.apache.camel.component.micrometer.routepolicy.MicrometerRoutePolicyNamingStrategy; import org.apache.camel.component.micrometer.spi.InstrumentedThreadPoolFactory; import org.apache.camel.component.platform.http.PlatformHttpComponent; -import org.apache.camel.component.platform.http.main.MainHttpServer; import org.apache.camel.component.platform.http.main.ManagementHttpServer; import org.apache.camel.component.platform.http.vertx.VertxPlatformHttpRouter; import org.apache.camel.spi.CamelEvent; @@ -77,14 +76,8 @@ public class MicrometerPrometheus extends ServiceSupport implements CamelMetrics private static final String CONTENT_TYPE_004 = "text/plain; version=0.0.4; charset=utf-8"; private static final String CONTENT_TYPE_100 = "application/openmetrics-text; version=1.0.0; charset=utf-8"; - @Deprecated - // Use managementServer instead - private MainHttpServer mainServer; - private ManagementHttpServer managementServer; - @Deprecated - // Use managementRouter instead - private VertxPlatformHttpRouter mainRouter; - private VertxPlatformHttpRouter managementRouter; + private ManagementHttpServer server; + private VertxPlatformHttpRouter router; private PlatformHttpComponent platformHttpComponent; private CamelContext camelContext; @@ -426,24 +419,13 @@ public class MicrometerPrometheus extends ServiceSupport implements CamelMetrics boolean enabled = false; platformHttpComponent = camelContext.getComponent("platform-http", PlatformHttpComponent.class); - mainServer = camelContext.hasService(MainHttpServer.class); - if (mainServer != null && mainServer.isMetricsEnabled() && platformHttpComponent != null) { - mainRouter = mainServer.getRouter(); - if (mainRouter != null) { - setupHttpScraper(mainRouter, false); - LOG.info("MicrometerPrometheus enabled with HTTP scraping on port {} on path {}", - mainServer.getPort(), path); - enabled = true; - } - } - - managementServer = camelContext.hasService(ManagementHttpServer.class); - if (managementServer != null && managementServer.isMetricsEnabled() && platformHttpComponent != null) { - managementRouter = managementServer.getRouter(); - if (managementRouter != null) { - setupHttpScraper(managementRouter, true); + server = camelContext.hasService(ManagementHttpServer.class); + if (server != null && server.isMetricsEnabled() && platformHttpComponent != null) { + router = server.getRouter(); + if (router != null) { + setupHttpScraper(router); LOG.info("MicrometerPrometheus enabled with HTTP scraping on management port {} on path {}", - managementServer.getPort(), path); + server.getPort(), path); enabled = true; } } @@ -480,7 +462,7 @@ public class MicrometerPrometheus extends ServiceSupport implements CamelMetrics createdBinders.clear(); } - protected void setupHttpScraper(VertxPlatformHttpRouter router, boolean isManagementPort) { + protected void setupHttpScraper(VertxPlatformHttpRouter router) { Route metrics = router.route(path); metrics.method(HttpMethod.GET); @@ -507,12 +489,7 @@ public class MicrometerPrometheus extends ServiceSupport implements CamelMetrics // use blocking handler as the task can take longer time to complete metrics.handler(new BlockingHandlerDecorator(handler, true)); - if (isManagementPort) { - platformHttpComponent.addHttpManagementEndpoint(path, "GET", - null, format, null); - } else { - platformHttpComponent.addHttpEndpoint(path, "GET", - null, format, null); - } + platformHttpComponent.addHttpManagementEndpoint(path, "GET", + null, format, null); } } diff --git a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_14.adoc b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_14.adoc index 320b8b945e8..bdf69e0fe77 100644 --- a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_14.adoc +++ b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_14.adoc @@ -19,6 +19,13 @@ Previously, each sub-message was independent (despite the documentation refers t has been mistakenly for many years, as this feature is rarely in use. However, we had the opportunity to look into this as part of an issue, and felt it's better to fix this before for this LTS release. +=== camel-main / camel-platform-http-main + +The HTTP server for standalone `camel-main` applications has separated management services and business services. +This means that configurations should be changed from `camel.server.xxx` to `camel.management.xxx` as shown: + +TODO: list of options + === camel-jbang The `camel-jbang` has upgraded to Java 21 as the default java-version when running and exporting. diff --git a/dsl/camel-kamelet-main/src/main/java/org/apache/camel/main/KameletMain.java b/dsl/camel-kamelet-main/src/main/java/org/apache/camel/main/KameletMain.java index eea73658d0b..b1a33cf27d2 100644 --- a/dsl/camel-kamelet-main/src/main/java/org/apache/camel/main/KameletMain.java +++ b/dsl/camel-kamelet-main/src/main/java/org/apache/camel/main/KameletMain.java @@ -490,6 +490,7 @@ public class KameletMain extends MainCommandLineSupport { if (silent) { // silent should not include http server configure().httpServer().withEnabled(false); + configure().httpManagementServer().withEnabled(false); } if (silent || "*".equals(stubPattern)) { @@ -544,12 +545,12 @@ public class KameletMain extends MainCommandLineSupport { boolean console = "true".equals(getInitialProperties().get(getInstanceType() + ".console")); if (console) { configure().setDevConsoleEnabled(true); - configure().httpServer().withEnabled(true); - configure().httpServer().withDevConsoleEnabled(true); + configure().httpManagementServer().withEnabled(true); + configure().httpManagementServer().withDevConsoleEnabled(true); // also include health,info and jolokia - configure().httpServer().withHealthCheckEnabled(true); - configure().httpServer().withInfoEnabled(true); - configure().httpServer().withJolokiaEnabled(true); + configure().httpManagementServer().withHealthCheckEnabled(true); + configure().httpManagementServer().withInfoEnabled(true); + configure().httpManagementServer().withJolokiaEnabled(true); } boolean tracing = "true".equals(getInitialProperties().get(getInstanceType() + ".backlogTracing")); if (tracing) { @@ -557,15 +558,15 @@ public class KameletMain extends MainCommandLineSupport { } boolean infoConsole = "true".equals(getInitialProperties().get(getInstanceType() + ".info")); if (infoConsole) { - configure().httpServer().withEnabled(true); - configure().httpServer().withInfoEnabled(true); + configure().httpManagementServer().withEnabled(true); + configure().httpManagementServer().withInfoEnabled(true); } // Deprecated: to be replaced by observe flag boolean health = "true".equals(getInitialProperties().get(getInstanceType() + ".health")); if (health) { configure().health().withEnabled(true); - configure().httpServer().withEnabled(true); - configure().httpServer().withHealthCheckEnabled(true); + configure().httpManagementServer().withEnabled(true); + configure().httpManagementServer().withHealthCheckEnabled(true); } // Deprecated: to be replaced by observe flag boolean metrics = "true".equals(getInitialProperties().get(getInstanceType() + ".metrics")); @@ -575,8 +576,8 @@ public class KameletMain extends MainCommandLineSupport { .withEnableMessageHistory(true) .withEnableExchangeEventNotifier(true) .withEnableRoutePolicy(true).withEnabled(true); - configure().httpServer().withEnabled(true); - configure().httpServer().withMetricsEnabled(true); + configure().httpManagementServer().withEnabled(true); + configure().httpManagementServer().withMetricsEnabled(true); } boolean ignoreLoading = "true".equals(getInitialProperties().get(getInstanceType() + ".ignoreLoadingError")); if (ignoreLoading) { @@ -683,14 +684,15 @@ public class KameletMain extends MainCommandLineSupport { // reloader if (sourceDir != null) { + configure().httpServer().withEnabled(true); configure().httpServer().withStaticSourceDir(sourceDir); - configure().httpServer().withUploadSourceDir(sourceDir); + configure().httpManagementServer().withEnabled(true); + configure().httpManagementServer().withUploadSourceDir(sourceDir); if (console || health) { // allow to upload/download source (source-dir is intended to be dynamic) via http when HTTP console enabled - configure().httpServer().withEnabled(true); - configure().httpServer().withUploadEnabled(true); - configure().httpServer().withDownloadEnabled(true); + configure().httpManagementServer().withUploadEnabled(true); + configure().httpManagementServer().withDownloadEnabled(true); } RouteOnDemandReloadStrategy reloader = new RouteOnDemandReloadStrategy(sourceDir, true); reloader.setPattern("*");
