From 8b34b70a56e7c029d73bcb20917620e7d6553eef Mon Sep 17 00:00:00 2001 From: Rohan Kumar Date: Fri, 2 Jul 2021 16:11:33 +0530 Subject: [PATCH] Fix #756: Service re-apply error happening during `k8s:watch` Use patch() instead of edit() in order to avoid 422 from APIServer. KubernetesClient no longer handles object modification in case of edit() when base object is provided. Signed-off-by: Rohan Kumar --- CHANGELOG.md | 1 + .../java/org/eclipse/jkube/kit/config/service/PatchService.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bf71ad1dec..dc12ecbea5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -35,6 +35,7 @@ Usage: * Fix #701: Update Fabric8 Kubernetes Client to 5.4.0 * Fix #425: Multi-layer support for Container Images * Fix #751: QuarkusGenerator: Multi-layer images for the different Quarkus packaging modes +* Fix #756: Service re-apply error happening during `k8s:watch` ### 1.3.0 (2021-05-18) * Fix #497: Assembly descriptor removed but still in documentation diff --git a/jkube-kit/config/service/src/main/java/org/eclipse/jkube/kit/config/service/PatchService.java b/jkube-kit/config/service/src/main/java/org/eclipse/jkube/kit/config/service/PatchService.java index e938a5e07e..e4c17792f0 100644 --- a/jkube-kit/config/service/src/main/java/org/eclipse/jkube/kit/config/service/PatchService.java +++ b/jkube-kit/config/service/src/main/java/org/eclipse/jkube/kit/config/service/PatchService.java @@ -170,7 +170,7 @@ private static EntityPatcher servicePatcher() { return client.services() .inNamespace(namespace) .withName(newObj.getMetadata().getName()) - .edit(p -> entity.build()); + .patch(entity.build()); }; }