Skip to content

Commit 7028dc4

Browse files
authored
Merge pull request #412 from TwinProduction/patch-1
Add merge in ProtoClient
2 parents 6e621b2 + 5d07d60 commit 7028dc4

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
@@ -132,6 +132,20 @@ public <T extends Message> ObjectOrStatus<T> update(
132132
return request(obj.newBuilderForType(), path, "PUT", obj, apiVersion, kind);
133133
}
134134

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+
}
148+
135149
/**
136150
* Delete a kubernetes API object using protocol buffer encoding.
137151
*

0 commit comments

Comments
 (0)