Thundercloud12 opened a new pull request, #6841:
URL: https://github.com/apache/camel-k/pull/6841

   Fixes #6800
   
   ### Motivation
   
   In Camel K 2.11+, `camel-quarkus-observability-services` is injected by 
default into `plain-quarkus` runtime integrations to provide opinionated health 
and metrics services on port `9876`.
   
   However, users may need to opt out and exclude this dependency for specific 
deployment requirements or when using custom observability solutions.
   
   ### Changes
   
   1. **API Constant**
   
      * Defined `CamelQuarkusObservabilityServicesArtifactID` in 
`pkg/apis/camel/v1/camelcatalog_types.go`, alongside `MavenQuarkusGroupID`.
      * Referenced it in `pkg/controller/catalog/initialize.go` as a single 
source of truth.
   
   2. **Camel Trait Flag**
   
      * Added the `SkipObservabilityServices *bool` property to `CamelTrait` in 
`pkg/apis/camel/v1/trait/camel.go`.
      * Supports CLI usage:
   
        ```bash
        kamel run route.java -t camel.skip-observability-services=true
        ```
   
   3. **IntegrationKit Matching**
   
      * Updated `camelTrait.Matches()` in `pkg/trait/camel.go` to compare 
`SkipObservabilityServices`.
      * This prevents IntegrationKits with and without 
`camel-quarkus-observability-services` from being reused interchangeably.
   
   4. **Dependency Filtering**
   
      * Updated `dependenciesTrait.Apply()` in `pkg/trait/dependencies.go` to 
filter out:
   
        ```text
        mvn:org.apache.camel.quarkus:camel-quarkus-observability-services
        ```
   
        when `skip-observability-services=true` is configured.
      * `camel-quarkus-core` and other runtime/language dependencies remain 
unaffected.
   
   5. **Health Trait Suppression**
   
      * Updated `healthTrait` in `pkg/trait/health.go`:
   
        * When `skip-observability-services=true` and no custom probes are 
configured, the health trait disables itself by default.
        * This follows the existing pattern used for self-managed builds and 
older runtimes and avoids configuring non-functional default probes against 
port `9876`.
        * When custom probe paths are configured (for example, `-t 
health.readiness-probe=...`), the custom probes are honored and their port 
defaults fall back to `8080` instead of `9876`.
   
   6. **Codegen & Documentation**
   
      * Regenerated deepcopy code, CRD schemas, Helm manifests, and trait 
reference documentation using:
   
        ```bash
        make generate
        ```
   
   7. **Tests**
   
      * Added comprehensive unit tests covering:
   
        * `dependencies_test.go`
        * `camel_test.go`
        * `health_test.go`
   
   ### Verification
   
   * `go test ./pkg/trait/...` passed with 100% success.
   * `make fmt goimport` completed successfully.
   * `git diff --check` passed with no whitespace errors.
   * No formatting or lint issues were detected.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to