jamesnetherton opened a new pull request, #27863: URL: https://github.com/apache/camel/pull/27863
[CAMEL-25031](https://issues.apache.org/jira/browse/CAMEL-25031) Upgrades the fabric8 Kubernetes client from 7.9.0 to 8.0.0 ([release notes](https://github.com/fabric8io/kubernetes-client/releases/tag/v8.0.0), [migration guide](https://github.com/fabric8io/kubernetes-client/blob/main/doc/MIGRATION-v8.md)). This is the follow-up to #27825 that @davsclaus asked for. In 8.0, `kubernetes-client` uses `kubernetes-httpclient-vertx-5` by default, which removes Vert.x 4 from both places flagged in that review: - **`camel-launcher`**: `BOOT-INF/lib` now has `kubernetes-httpclient-vertx-5` 8.0.0 and only Vert.x 5 jars. Before, `vertx-core` 4.x came in through `camel-jbang-plugin-kubernetes` next to `vertx-web` 5. - **`camel-kubernetes`**: applications no longer get `vertx-core` 4.x through `kubernetes-client`. fabric8 8.0.0 is built against Vert.x 5.2.0 and Camel uses 5.2.1, so the launcher has a mix of 5.2.0 and 5.2.1 artifacts. This is a patch-level difference like the one the released 4.22.1 launcher already has (4.5.28 and 4.5.34), and it isn't pinned here. ## Changes - `parent/pom.xml`: `kubernetes-client-version` 7.9.0 → 8.0.0. - `camel-jbang-plugin-kubernetes`: - Depends on `kubernetes-httpclient-vertx-5` instead of `kubernetes-httpclient-vertx`. `KubernetesRun` uses `Vertx5HttpClientFactory` for the shutdown hook client, and now closes the `Vertx` instance it creates for it. - `KubernetesHelper` builds its mapper with Jackson 3 (`JsonMapper.builderWithJackson2Defaults()`, same settings as before). The 8.x model only carries Jackson 3 serializers, so a Jackson 2 mapper writes `IntOrString` and `Quantity` in the wrong shape in exported manifests. `MapperFeature.BLOCK_UNSAFE_POLYMORPHIC_BASE_TYPES` is dropped, as it doesn't exist in Jackson 3 and this mapper uses no polymorphic typing. - Declares `tools.jackson.core:jackson-databind` through the `tools.jackson:jackson-bom` import, like `camel-jackson3`. - `camel-kubernetes`: `LockTestServer` (test) uses fabric8 `Serialization` instead of a Jackson 2 `ObjectMapper` with `JavaTimeModule`. - 4.24 upgrade guide: a new "camel-kubernetes - Kubernetes client 8" section covering: - the new HTTP client artifact to exclude; - the different JSON Jackson 2 (`camel-jackson`) produces for the 8.x model, with `camel-jackson3` as the replacement; - the `jackson-annotations` 2.21+ requirement of Jackson 3. The rest of Camel stays on Jackson 2. Jackson 3 is only used by the Kubernetes modules here; moving Camel to Jackson 3 is a separate task. ## Testing - `camel-kubernetes`: 179 unit tests pass. - `camel-jbang-plugin-kubernetes`: 153 unit tests pass. - `camel-kubernetes` integration tests against a local kind cluster (Kubernetes 1.37): 39 of 43 pass. The 4 failures (`KubernetesEventsConsumerClusterwideLabelsIT`, `KubernetesHPAConsumerClusterwideIT`, `KubernetesHPAConsumerClusterwideLabelsIT`, `KubernetesServicesConsumerClusterwideLabelsIT`) fail the same way on 7.9.0. They are cluster-wide watches that also receive events from the other tests' namespaces. - `camel kubernetes run --dev` with the launcher built from this branch against kind: the image is built and pushed, the app deploys and serves its REST route, and the CLI follows the pod and its logs with the 8.0 client. - Jackson behaviour checked directly with fabric8 8.0.0: - `KubernetesHelper.dumpYaml` writes `targetPort: http` / `8081` and `cpu: 500m` / `memory: 256Mi` correctly. - A Jackson 2 mapper writes `{"value":8080,"intVal":8080}` and `{"amount":"500","format":"m"}`, which is the case the upgrade guide documents. On 7.9.0, Jackson 2 writes `8080` and `"500m"`. The `--cleanup` shutdown hook in `camel kubernetes run --dev` didn't delete the resources on SIGTERM in that test. The released 4.22.1 launcher behaves the same way, so it isn't caused by this change, but the shutdown hook client isn't covered at runtime here. Once this is merged, #27042 can be reopened to bring back Dependabot for this dependency. _Claude Code on behalf of @jamesnetherton_ 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- 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]
