diff --git a/util/src/main/java/io/kubernetes/client/ProtoClient.java b/util/src/main/java/io/kubernetes/client/ProtoClient.java index 780ae423f3..3d5120b28b 100644 --- a/util/src/main/java/io/kubernetes/client/ProtoClient.java +++ b/util/src/main/java/io/kubernetes/client/ProtoClient.java @@ -132,6 +132,20 @@ public ObjectOrStatus update( return request(obj.newBuilderForType(), path, "PUT", obj, apiVersion, kind); } + /** + * Merge a Kubernetes API object using protocol buffer encoding. Performs a PATCH + * + * @param obj The object to merge + * @param path The URL path to call + * @param apiVersion The api version to use + * @param kind The kind of the object + * @return An ObjectOrStatus which contains the Object requested, or a Status about the request. + */ + public ObjectOrStatus merge( + T obj, String path, String apiVersion, String kind) throws ApiException, IOException { + return request(obj.newBuilderForType(), path, "PATCH", obj, apiVersion, kind); + } + /** * Delete a kubernetes API object using protocol buffer encoding. *