[
https://issues.apache.org/jira/browse/CAMEL-24498?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18110636#comment-18110636
]
Federico Mariani commented on CAMEL-24498:
------------------------------------------
PR opened: https://github.com/apache/camel-spring-boot/pull/1927
The starter now injects {{management.server.address=127.0.0.1}} alongside the
port, defaults {{management.endpoint.health.show-details}} to
{{when-authorized}}, and no longer injects {{camel.health.exposure-level}}
(Camel's {{default}} level applies; {{full}} is documented as an opt-in).
The {{live}} and {{ready}} health groups keep {{show-details=always}}: the
kubelet reads them unauthenticated (so {{when-authorized}} would collapse to
{{never}} there) and puts the response body into the probe-failure event, so
{{kubectl describe pod}} still names the indicator that took the pod down. Both
groups contain availability-state indicators only -
{{CamelLivenessStateHealthIndicator}} and
{{CamelReadinessStateHealthIndicator}} extend Spring's availability indicators,
which report a status and contribute no details - so {{always}} exposes the
indicator names and their state and nothing more.
The starter now has {{src/main/doc/intro.adoc}} and {{usage.adoc}} documenting
the full injected property set as a table, plus sections on the bind address,
health detail exposure and the Camel exposure level. A test asserts the
injected key set matches the documented table so the two cannot drift apart.
Kubernetes deployments whose probes or scrapers reach the pod over the network
must now set {{management.server.address=0.0.0.0}} explicitly. An upgrade-guide
entry for the 4.23 guide in apache/camel has been drafted and will be raised
separately.
Tests: 10 tests in {{camel-observability-services-starter}}, all passing.
_Comment added by Claude Code on behalf of Federico Mariani._
> camel-observability-services-starter - injected management defaults exceed
> the Spring Boot baseline
> ---------------------------------------------------------------------------------------------------
>
> Key: CAMEL-24498
> URL: https://issues.apache.org/jira/browse/CAMEL-24498
> Project: Camel
> Issue Type: Improvement
> Components: camel-spring-boot-starters
> Reporter: Andrea Cosentino
> Assignee: Federico Mariani
> Priority: Major
> Fix For: 4.23.0
>
>
> {{ObservabilityServicesEnvironmentPostProcessor}} injects a set of management
> defaults whenever the starter is on the classpath:
> {code:java}
> defaults.put("management.server.port", "9876");
> defaults.put("management.endpoints.web.exposure.include",
> "health,prometheus");
> ...
> defaults.put("camel.health.exposure-level", "full");
> defaults.put("management.endpoint.health.show-details", "always");
> defaults.put("management.endpoint.health.group.live.show-details", "always");
> defaults.put("management.endpoint.health.group.ready.show-details", "always");
> {code}
> (ObservabilityServicesEnvironmentPostProcessor:40-60)
> Three of these are broader than the Spring Boot defaults they replace:
> - {{management.server.port}} is set without a matching
> {{management.server.address}}, so the second listener binds all interfaces.
> Spring Boot has no default management port at all.
> - {{management.endpoint.health.show-details}} is {{always}} where Spring
> Boot's default is {{never}}.
> - {{camel.health.exposure-level}} is {{full}} where the Camel default is
> {{default}}.
> The property source is added with {{addLast}}, so user configuration wins -
> this is about what an operator gets when they add the starter and configure
> nothing.
> *Proposal*
> - Set {{management.server.address=127.0.0.1}} alongside the port so exposing
> the listener is a conscious step.
> - Default {{show-details}} to {{when-authorized}}, keeping {{always}} for the
> {{live}}/{{ready}} probe groups if the k8s probe flow needs it.
> - Leave {{camel.health.exposure-level}} at its default and document {{full}}
> as an opt-in.
> - Document the combination in the starter's docs.
> Note for the release notes: Kubernetes deployments whose kubelet probes or
> Prometheus scrapers reach the pod over the network would need to set
> {{management.server.address=0.0.0.0}} explicitly after this change. That is a
> deliberate behaviour change and should be called out in the upgrade guide.
> ----
> _This issue was drafted by Claude Code on behalf of Andrea Cosentino._
--
This message was sent by Atlassian Jira
(v8.20.10#820010)