Skip to content

Commit ed9805c

Browse files
committed
Add merge in ProtoClient
1 parent 0b64a0a commit ed9805c

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

util/src/main/java/io/kubernetes/client/ProtoClient.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,20 @@ public <T extends Message> ObjectOrStatus<T> update(
131131
T obj, String path, String apiVersion, String kind) throws ApiException, IOException {
132132
return request(obj.newBuilderForType(), path, "PUT", obj, apiVersion, kind);
133133
}
134+
135+
/**
136+
* Merge a Kubernetes API object using protocol buffer encoding. Performs a PATCH
137+
*
138+
* @param obj The object to merge
139+
* @param path The URL path to call
140+
* @param apiVersion The api version to use
141+
* @param kind The kind of the object
142+
* @return An ObjectOrStatus which contains the Object requested, or a Status about the request.
143+
*/
144+
public <T extends Message> ObjectOrStatus<T> merge(
145+
T obj, String path, String apiVersion, String kind) throws ApiException, IOException {
146+
return request(obj.newBuilderForType(), path, "PATCH", obj, apiVersion, kind);
147+
}
134148

135149
/**
136150
* Delete a kubernetes API object using protocol buffer encoding.

0 commit comments

Comments
 (0)